-
Notifications
You must be signed in to change notification settings - Fork 494
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
[Internal] Query: Adds support for continuation using SqlQuerySpec #3774
[Internal] Query: Adds support for continuation using SqlQuerySpec #3774
Conversation
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.
All good!
Microsoft.Azure.Cosmos/src/Query/Core/ResumeValueToCosmosElementConverter.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/ResumeValueComparer.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/ItemComparer.cs
Outdated
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Outdated
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Outdated
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Outdated
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Outdated
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Show resolved
Hide resolved
...soft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByContinuationToken.cs
Show resolved
Hide resolved
...os/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs
Outdated
Show resolved
Hide resolved
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.
…ived objects. update cosmosundefinedquerytests. other code review comments.
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSerializerUnitTests.cs
Show resolved
Hide resolved
…esume value. unit tests for SqlQueryResumeValue.
…r by and group by tests. reducing the document count to reduce execution time.
…etter symmetry for comparing arrays and objects.
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.
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.
Pull Request Template
Description
Currently, supporting continuation for cross partition order by requires us to re-write the queries filter to resume from the last returned order by value. This approach of re-writing filters is very cumbersome for multi-item order by and this approach doesn't work when the continuation value is an array or object.
The new approach is to send the resume value as part of SqlQuerySpec to backend which uses it to resume the query. The backend changes have already been checked in and is currently being deployed.
Current OrderByContinuationToken:
New Token:
Contains resumeValues instead of orderByItems.
Undefined values are represented by an empty array "[]"
Array and Object are represented in resume value by their hash value
Old continuation tokens with orderByItems will be converted to SqlQuerySpec ResumeValue during pipeline create stage.
ResumeValue doesn't support C* types so the old continuation token format will be used for these types.
Type of change
Closing issues
#3639