Skip to content

Translate set operations over null-checked non-entity subqueries - #38844

Closed
AndriySvyryd with Copilot wants to merge 3 commits into
release/11.0from
copilot/fix-null-checked-subquery-translations
Closed

AndriySvyryd with Copilot wants to merge 3 commits into
release/11.0from
copilot/fix-null-checked-subquery-translations

Conversation

Copilot AI commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Set operations failed when a projection repeatedly referenced a to-one non-entity subquery and compared the projected object with null. The synthetic nullability marker forced client projection handling, causing Concat/Union translation to be rejected.

withOrders.Concat(neverOrdered)
  • Translation

    • Rebind translatable client projections to server projection mappings before set operations.
    • Reduce marker-gated object null checks to marker predicates.
    • Preserve rejection when genuine client evaluation remains.
  • Coverage

    • Add the Northwind Concat regression scenario and SQL baseline.
    • Update the existing nullable non-entity Union characterization to assert translated results.

Copilot AI changed the title [WIP] Fix set operation over null-checked to-one non-entity subquery Translate set operations over null-checked non-entity subqueries Aug 21, 2026
Copilot AI requested a review from AndriySvyryd August 21, 2026 21:52
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc2 milestone Aug 21, 2026
@AndriySvyryd
AndriySvyryd requested a balanced review from Copilot August 22, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes relational set-operation translation for projections using null-checked non-entity subqueries.

Changes:

  • Rebinds eligible client projections before set operations.
  • Reduces marker-gated object null checks to SQL predicates.
  • Adds Concat/Union regression coverage and SQL baselines.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SelectExpression.cs Exposes client-projection state.
RelationalQueryableMethodTranslatingExpressionVisitor.cs Rebinds set-operation operands.
RelationalProjectionBindingExpressionVisitor.cs Transforms null checks and projection bindings.
NorthwindSetOperationsQueryRelationalTestBase.cs Adds Concat regression coverage.
NorthwindSetOperationsQuerySqlServerTest.cs Adds the SQL Server baseline.
AdHocMiscellaneousQueryRelationalTestBase.cs Converts Union characterization to result assertions.
AdHocMiscellaneousQuerySqlServerTest.cs Adds the translated Union SQL baseline.

Copilot AI requested a review from AndriySvyryd August 22, 2026 00:47
@AndriySvyryd
AndriySvyryd requested a balanced review from Copilot and removed request for AndriySvyryd August 22, 2026 03:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@AndriySvyryd
AndriySvyryd deleted the copilot/fix-null-checked-subquery-translations branch August 22, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set operation over a projection containing a null-checked to-one non-entity subquery no longer translates (11 preview.7 regression)

3 participants