-
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
Cosmos: Redo ReadItem and partition key management #34187
Merged
Merged
Conversation
This file contains 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
roji
changed the title
Redo ReadItem and partition key management
Cosmos: Redo ReadItem and partition key management
Jul 8, 2024
roji
force-pushed
the
CosmosReadItem
branch
2 times, most recently
from
July 8, 2024 18:28
ff6c096
to
499e04f
Compare
Closes dotnet#20693 Closes dotnet#20350 Fixes dotnet#34085 Fixes dotnet#33960
roji
commented
Jul 8, 2024
@@ -56,8 +54,8 @@ public static class CosmosQueryableExtensions | |||
/// <returns>A new query with the set partition key.</returns> | |||
public static IQueryable<TEntity> WithPartitionKey<TEntity>( | |||
this IQueryable<TEntity> source, | |||
[NotParameterized] object partitionKeyValue, |
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 caused us to recompile the query for each different constant value of a partition key passed to WithPartitionKey()... We now support proper parameterization.
AndriySvyryd
reviewed
Jul 8, 2024
src/EFCore.Cosmos/Query/Internal/CosmosReadItemAndPartitionKeysExtractor.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
reviewed
Jul 8, 2024
src/EFCore.Cosmos/Query/Internal/CosmosReadItemAndPartitionKeysExtractor.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
reviewed
Jul 8, 2024
src/EFCore.Cosmos/Query/Internal/CosmosReadItemAndPartitionKeysExtractor.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
reviewed
Jul 9, 2024
src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.Util.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
reviewed
Jul 9, 2024
src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.Util.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
reviewed
Jul 9, 2024
src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.Util.cs
Outdated
Show resolved
Hide resolved
AndriySvyryd
approved these changes
Jul 9, 2024
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.
[NonParameterized]
was used, causing us to recompile queries with different WithPartitionKey arguments. We now properly parameterize and use a single compilation.Closes #20693
Closes #20350
Fixes #34085
Fixes #33960