Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Dec 9, 2023

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

// 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)
Copy link
Member Author

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)
Copy link
Member Author

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).

@roji roji force-pushed the DestroyAllCorrelation branch from 6cf95cb to 55564fa Compare January 8, 2024 15:29
@roji roji marked this pull request as ready for review January 8, 2024 20:04
@roji roji requested a review from maumar January 8, 2024 20:05
@roji roji merged commit 7b712f8 into dotnet:main Jan 9, 2024
@roji roji deleted the DestroyAllCorrelation branch January 9, 2024 06:28
roji added a commit to roji/efcore that referenced this pull request Jan 10, 2024
roji added a commit to roji/efcore that referenced this pull request Jan 10, 2024
roji added a commit to roji/efcore that referenced this pull request Jan 10, 2024
roji added a commit that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contains translates to correlated query when the item is nullable

2 participants