-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Produce uncorrelated IN for Contains with nullable item #32575
Conversation
// 2nd-level query pipeline); to need to flow the mutable dictionary in. Note that any modification of parameter values (as | ||
// here) must immediately entail DoNotCache(). | ||
Check.DebugAssert(ParameterValues is Dictionary<string, object?>, "ParameterValues isn't a Dictionary"); | ||
if (ParameterValues is not Dictionary<string, object?> mutableParameterValues) |
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.
This is something I intend to clean up in a later PR, i.e. expose the mutable parameter dictionary to SqlNullabilityProcessor.
/// any release. You should only use it directly in your code with extreme caution and knowing that | ||
/// doing so can result in application failures when updating to a new Entity Framework Core release. | ||
/// </summary> | ||
protected override bool IsCollectionTable(TableExpressionBase table, [NotNullWhen(true)] out Expression? collection) |
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.
It's not great that providers have to override these two hooks to deal with the provider-specific primitive collection expressions; #32576 tracks doing something better here (that's why these APIs are pubternal for now).
55f3902
to
6cf95cb
Compare
6cf95cb
to
55564fa
Compare
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
See #32574 for a description of what this does. After this, Contains over a parameter should never generate correlated EXISTS, only uncorrelated IN.
Fixes #32574