Skip to content

Conversation

roji
Copy link
Member

@roji roji commented Nov 25, 2024

Fixes #35118
Port of #35120

Description
The deep query pipeline re-architecting in 9.0 included turning our SQL expression tree into a real tree rather than a graph, i.e. removing cycles where a SQL table was referenced both from its containing SelectExpression, and from any referencing columns. As a result, a changed predicate check for TPC inheritance was broken and did not correctly access the column's table when the column was nested in a subquery and referenced an outer table.

Customer impact
LINQ queries including a minimal equality predicate where a column references an outer table are now broken. For example:

var results = await context.As
    .Where(a => context.As.Where(g => a.Name == "A").Any())
    .ToListAsync();

These queries are sufficiently common, and the fix sufficiently simple, that servicing seems justified.

How found
Customer reported on 9.0.0

Regression
Yes, from 8.0.

Testing
Test added.

Risk
Low, quirk added.

@roji roji marked this pull request as ready for review November 25, 2024 15:50
@roji roji requested a review from a team November 25, 2024 16:17
@roji
Copy link
Member Author

roji commented Nov 26, 2024

Approved via email

@roji roji merged commit a8c7b9d into dotnet:release/9.0-staging Nov 26, 2024
7 checks passed
@roji roji deleted the GetTable9 branch November 26, 2024 19:41
This was referenced Jul 22, 2025
This was referenced Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants