Repository navigation
[release/11.0] Preserve null compensation for JSON complex properties in left joins - #39751
Open
AndriySvyryd wants to merge 2 commits into
Open
AndriySvyryd wants to merge 2 commits into
AndriySvyryd wants to merge 2 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the change is supported by targeted regression tests and provider-specific SQL baselines for the affected left-join scenarios.
No open issues 🎉
What changed in this PR
This pull request preserves null compensation when filtering JSON-mapped complex properties on the optional side of relational left joins, ensuring unmatched rows are retained.
Changes:
- Propagates nullable state into JSON query expressions for nullable complex-type shapers.
- Adds regression tests for direct, nested, and subquery-based left joins.
- Adds SQLite and SQL Server SQL baselines for the new scenarios and JSON storage modes.
| File | Description |
|---|---|
| test/EFCore.SqlServer.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousSqlServerTest.cs | Adds SQL Server baselines covering null compensation for native and legacy JSON mappings. |
| test/EFCore.Sqlite.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousSqliteTest.cs | Adds SQLite SQL baselines for the JSON left-join regression scenarios. |
| test/EFCore.Relational.Specification.Tests/Query/Associations/ComplexJson/ComplexJsonMiscellaneousRelationalTestBase.cs | Adds provider-independent regression tests for direct, nested, and subquery-based left joins. |
| src/EFCore.Relational/Query/RelationalStructuralTypeShaperExpression.cs | Propagates shaper nullability into JSON query expressions when making complex-type shapers nullable. |
Review effort: Lite
AndriySvyryd
marked this pull request as ready for review
November 24, 2026 01:31
Code coverage overviewLanguages: C# C# / code-coverage
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
cincuranet
approved these changes
Nov 26, 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 #39523
Ports #39524
Description
Propagate nullability into JSON complex-type query expressions on the optional side of a left join, preserving null compensation in filters.
Customer impact
Affected queries can silently omit unmatched rows on SQL Server and SQLite. No workaround is known.
How found
Customer-reported on 11.0.0-rc.3.
Regression
Yes, from 10.0.*
Testing
Added direct, nested and subquery regression cases.
Risk
Low: the change is limited to propagating nullability for JSON complex-type shapers; provider-specific regression coverage was added.