Produce uncorrelated IN for Contains with nullable item#32575
Merged
roji merged 1 commit intodotnet:mainfrom Jan 9, 2024
Merged
Produce uncorrelated IN for Contains with nullable item#32575roji merged 1 commit intodotnet:mainfrom
roji merged 1 commit intodotnet:mainfrom
Conversation
roji
commented
Dec 9, 2023
| // 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) |
Member
Author
There was a problem hiding this comment.
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) |
Member
Author
There was a problem hiding this comment.
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
maumar
approved these changes
Jan 9, 2024
roji
added a commit
to roji/efcore
that referenced
this pull request
Jan 10, 2024
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
roji
added a commit
to roji/efcore
that referenced
this pull request
Jan 10, 2024
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
roji
added a commit
to roji/efcore
that referenced
this pull request
Jan 10, 2024
Fixes dotnet#32574 (cherry picked from commit 7b712f8)
roji
added a commit
that referenced
this pull request
Jan 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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