Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0] Correct VisitUnary operand evaluation in funcletizer (#35172) #35203

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

roji
Copy link
Member

@roji roji commented Nov 25, 2024

Fixes #35152
Port of #35172

Description
In 9.0, EF's funcletizer was rewritten for performance and NativeAOT support; this is the very first component that processes the incoming expression tree, extracting parameters and performing other important tasks. In the new implementation, processing of unary expression nodes was faulty, not setting the expression visitor's state properly.

Customer impact
For various query types involving unary expression nodes (e.g. Convert), the query fails to translate. For example, in the following query type, the cast to object is a mishandled unary node:

var v = 1;
var q = await context.Set<Blog>().OrderBy(x => (object)v).ToListAsync();

As this querying scenario seems somewhat common, and the fix is very low-risk (add missing Convert node), it seems like this is a good candidate for servicing.

How found
Customer reported on 9.0.0

Regression
Yes, from 8.0.

Testing
Test added.

Risk
Low, quirk added.

@roji
Copy link
Member Author

roji commented Nov 26, 2024

Approved via email

@roji roji enabled auto-merge (squash) November 26, 2024 19:45
@roji roji disabled auto-merge November 26, 2024 19:45
@roji roji enabled auto-merge (squash) November 26, 2024 19:45
@roji roji requested a review from maumar November 26, 2024 19:46
@roji roji merged commit 3695bca into dotnet:release/9.0-staging Nov 26, 2024
7 checks passed
@roji roji deleted the LambdaEvaluability9 branch November 26, 2024 20:27
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