-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Translate to IN + subquery when possible instead of EXISTS #30976
Conversation
// Null out the value for the inferred type mapping as an indication of the conflict. If it turns out that we need the | ||
// inferred mapping later, during the application phase, we'll throw an exception at that point (not all the inferred type | ||
// mappings here will actually be needed, so we don't want to needlessly throw here). | ||
_inferredColumns[(underlyingTable, columnExpression.Name)] = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the "conflicting inferred type mappings" exception to later in the process, so that we don't throw if we don't actually need the inferred mapping (i.e. it doesn't apply to an untyped inline/parameter collection). This should be safer.
src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Given the pretty massive perf impact this has (see #30955 (comment)), converting to a draft to consider using IN in more scenarios instead of rewriting to EXISTS (but this can still be reviewed already). |
This builds on top of #30956 (ignore first commit)to translate to IN+subquery where possible (see #30955).Closes #30955