Skip to content

[release/8.0] Visit inside InlineQueryRootExpression in nav expansion#32467

Merged
roji merged 1 commit into
dotnet:release/8.0from
roji:release/8.0
Jan 4, 2024
Merged

[release/8.0] Visit inside InlineQueryRootExpression in nav expansion#32467
roji merged 1 commit into
dotnet:release/8.0from
roji:release/8.0

Conversation

@roji

@roji roji commented Nov 30, 2023

Copy link
Copy Markdown
Member

Fixes #32331, backports #32460.

Description

As part of the primitive collection work for EF 8, the new InlineCollectionQueryRoot expression type was introduced to represent collections which are inline in the LINQ query (e.g. Where(b => new[] { 1, 3 }.Where(...)). However, our navigation expansion visitor, which is responsible for processing navigations, was not modified to visit inside this new expression type; as a result, navigations inside subqueries within InlineCollectionQueryRoot do not work.

Customer impact

Queries which include navigations inside an inline collection fail to execute, e.g.:

_ = context.Blogs
    .Select(b => new[] { b.Updated, b.Posts.Max(p => p.Updated) }.Max())
    .ToList();

Such queries used to work in 7.0, if the code in question was in the top-level Select (and got client-evaluated).

How found

Customers reported on 8.0

Regression

Yes

Testing

Added.

Risk

Low - very targeted and single, simple fix (but in the query pipeline, which is never zero-risk). Quirk added.

@roji
roji requested a review from a team November 30, 2023 17:04
@AndriySvyryd

Copy link
Copy Markdown
Member

Note that the branch is currently closed.

@wtgodbe

wtgodbe commented Jan 3, 2024

Copy link
Copy Markdown
Member

@roji can you resolve the merge conflicts? Then I can merge

@roji
roji merged commit cdbc432 into dotnet:release/8.0 Jan 4, 2024
@roji
roji deleted the release/8.0 branch January 4, 2024 00:39
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.

4 participants