-
Notifications
You must be signed in to change notification settings - Fork 495
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
Aggregate Continuation Tokens #843
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
…ateContinuationToken
…zed into a continuation token
sboshra
reviewed
Oct 7, 2019
sboshra
reviewed
Oct 7, 2019
Microsoft.Azure.Cosmos/src/Query/Core/Aggregation/CountAggregator.cs
Outdated
Show resolved
Hide resolved
sboshra
reviewed
Oct 7, 2019
sboshra
reviewed
Oct 7, 2019
Microsoft.Azure.Cosmos/src/Query/Core/Aggregation/SingleGroupAggregator.cs
Outdated
Show resolved
Hide resolved
sboshra
previously approved these changes
Oct 7, 2019
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.
sboshra
reviewed
Oct 28, 2019
...osoft.Azure.Cosmos/src/Query/Core/ExecutionContext/PipelinedDocumentQueryExecutionContext.cs
Outdated
Show resolved
Hide resolved
sboshra
reviewed
Oct 28, 2019
...t.Azure.Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.cs
Outdated
Show resolved
Hide resolved
sboshra
reviewed
Oct 28, 2019
...ure.Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.SDK.cs
Outdated
Show resolved
Hide resolved
sboshra
reviewed
Oct 28, 2019
...Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.Compute.cs
Outdated
Show resolved
Hide resolved
sboshra
previously approved these changes
Oct 28, 2019
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.
j82w
reviewed
Oct 29, 2019
Microsoft.Azure.Cosmos/src/Query/Core/Aggregation/SumAggregator.cs
Outdated
Show resolved
Hide resolved
...Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.Compute.cs
Outdated
Show resolved
Hide resolved
...Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.Compute.cs
Show resolved
Hide resolved
...Cosmos/src/Query/Core/ExecutionComponent/AggregateDocumentQueryExecutionComponent.Compute.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CrossPartitionQueryTests.cs
Show resolved
Hide resolved
…hub.com/Azure/azure-cosmos-dotnet-v3 into users/brchon/AggregateContinuationToken
sboshra
approved these changes
Oct 31, 2019
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.
ealsur
pushed a commit
that referenced
this pull request
Nov 19, 2019
* added continuation token stop and start logic for aggregators * got continuation token ready * added preemption to aggregate query * fixed bug where query finishes in a single continuation * fixed continuation token double escaping bug * fixed bug where where min / max / undefined value was getting serialized into a continuation token * wired up try get state * resolved iteration comments * renamed * fixed tests for aggregates * dummy commit * bumped the timeout * reduced timeout * dummy commit * dummy commit * fixed infinite loop * aggregates technically can get continuation token (it's a single page always for now) * forked aggregates into compute and sdk implementations * fixed build issues * forked create paths * fixed cancellation token test * resolved iteration comments * resolved iteration comments * resolved iteration comments * changed continuation token logic * more inlined with early exit * more inlined with early exits
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.
Aggregate Continuation Tokens
Description
This change provides continuation token support for aggregate queries. Currently aggregate queries are not preempt-able, since we need to drain all the partial aggregate and emit the final result to the user. We also can't emit an partial aggregate, since the user is expecting a single result and does not want to aggregate the partial aggregates. The solution is to return empty pages with the partial aggregate in the continuation token. Since aggregates are done on a single grouping the continuation token is simply:
Like all continuation token changes we need to be able to serialize the query operator state and resume from it.
A natural follow up item is to support GROUP BY continuation tokens, since it's just multiple groupings.
Type of change
Please delete options that are not relevant.