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

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from

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 roji requested a review from a team November 25, 2024 16:31
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.

1 participant