Repository navigation
[release/11.0] Restore LEFT JOIN translation for correlated grouped DefaultIfEmpty - #39237
Merged
AndriySvyryd merged 4 commits intoOct 14, 2026
Merged
Conversation
…IfEmpty queries Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix regression in correlation translation to LEFT JOIN
[release/11.0] Restore LEFT JOIN translation for correlated grouped DefaultIfEmpty
Oct 13, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The servicing PR description omits the required customer impact, regression, testing, and risk sections.
0 open findings
What changed in this PR
Restores LEFT JOIN translation for correlated grouped or distinct DefaultIfEmpty queries while retaining a servicing opt-out.
Changes:
- Accepts nullable projected join keys.
- Adds shared behavioral tests and provider SQL baselines.
- Documents the query-pipeline nullability behavior.
| File | Description |
|---|---|
SelectExpression.cs |
Updates join-key matching and adds the compatibility switch. |
NorthwindGroupByQueryRelationalTestBase.cs |
Adds shared GroupBy and Distinct tests. |
NorthwindGroupByQuerySqlServerTest.cs |
Verifies SQL Server LEFT JOIN SQL. |
NorthwindGroupByQuerySqliteTest.cs |
Verifies SQLite LEFT JOIN SQL. |
query-pipeline/SKILL.md |
Documents nullable column identity handling. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
AndriySvyryd
marked this pull request as ready for review
October 13, 2026 20:28
AndriySvyryd
requested review from
artl93 and
cincuranet
and
a balanced review from Copilot
October 13, 2026 20:28
artl93
approved these changes
Oct 13, 2026
artl93
left a comment
Member
There was a problem hiding this comment.
Customer reported regression. Approved.
Code Coverage OverviewLanguages: C# C# / code-coverageThe overall line coverage in commit dce40ae in the Show a line coverage summary of the most impacted files.
|
cincuranet
approved these changes
Oct 14, 2026
AndriySvyryd
deleted the
copilot/fix-regression-translated-to-outer-apply
branch
October 14, 2026 20:57
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #39220
Description
Since 10.0-rc.2, correlated
SelectManyover a grouped subquery followed byDefaultIfEmpty()can produceOUTER APPLYinstead ofLEFT JOINeven when the key nullability doesn't match.Customer impact
Affected queries are translated to
OUTER APPLY, which causes providers without APPLY support (including SQLite and MariaDB) to throw instead of running the query. An explicitjoin … into … from … DefaultIfEmpty()is a workaround, but it's non-obvious and rewriting a complex query can require significant work.Example of an affected query:
How found
Customer-reported on 10.0.12.
Regression
Yes, from 9.0.x.
Testing
Tests added
Risk
Low. The change is a narrow condition that reverts to previous behavior. Quirk mode added.