Skip to content

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 force-pushed the LambdaEvaluability9 branch from 17b36d3 to 73ec049 Compare November 26, 2024 15:51
@roji roji force-pushed the LambdaEvaluability9 branch from 73ec049 to 7d26db5 Compare November 26, 2024 19:44
@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
This was referenced Sep 15, 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