Skip to content

MSSQL: Support deferred ON clauses in right-nested joins - #2606

Open
dvasdekis wants to merge 1 commit into
apache:mainfrom
dvasdekis:mssql-deferred-joins
Open

dvasdekis wants to merge 1 commit into
apache:mainfrom
dvasdekis:mssql-deferred-joins

Conversation

@dvasdekis

@dvasdekis dvasdekis commented Oct 2, 2026 •

Copy link
Copy Markdown

MSSQL: Support deferred ON clauses in right-nested joins

SELECT a.id FROM a LEFT JOIN b INNER JOIN c ON b.id = c.id ON a.id = b.id currently fails with MsSqlDialect.

Enable the existing right-nested JOIN capability for MSSQL; preserve predicate ownership and outer-join grouping.
Test mixed join types, deeper chains, canonical round-trips, immediate-condition chains, and malformed predicates.
This only enables MSSQL: it does not duplicate the shared parser changes in #2445 or the recursion work in #2440.
Draft pending coordination with #2440 and #2445; follows the PostgreSQL enablement in #2377.

Syntax reference: https://learn.microsoft.com/en-us/sql/t-sql/queries/from-transact-sql

Validation: cargo test --all-features, formatting, strict all-target/all-feature Clippy, and a bounded parser fuzz run.
Scope: parsing and AST representation only; schema resolution and lineage validation belong to downstream analyzers.
All examples and fixtures are synthetic.
Prepared with GitHub Copilot assistance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.11%. Comparing base (fc18670) to head (f365b47).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2606   +/-   ##
=======================================
  Coverage   81.11%   81.11%           
=======================================
  Files          42       42           
  Lines       33707    33710    +3     
  Branches    33707    33710    +3     
=======================================
+ Hits        27342    27345    +3     
  Misses       2796     2796           
  Partials     3569     3569           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SQL Server waiting on reviewer PR needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants