-
Notifications
You must be signed in to change notification settings - Fork 62
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
Offset limit query support #234
Offset limit query support #234
Conversation
Support for offset limit with continuation token
sdk/src/test/java/com/microsoft/azure/cosmosdb/rx/OffsetLimitQueryTests.java
Outdated
Show resolved
Hide resolved
gateway/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/query/TakeContinuationToken.java
Outdated
Show resolved
Hide resolved
...ay/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/query/OffsetContinuationToken.java
Show resolved
Hide resolved
gateway/src/main/java/com/microsoft/azure/cosmosdb/internal/query/QueryInfo.java
Show resolved
Hide resolved
...ay/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/query/OffsetContinuationToken.java
Outdated
Show resolved
Hide resolved
...ay/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/query/OffsetContinuationToken.java
Outdated
Show resolved
Hide resolved
...n/java/com/microsoft/azure/cosmosdb/rx/internal/query/SkipDocumentQueryExecutionContext.java
Show resolved
Hide resolved
...n/java/com/microsoft/azure/cosmosdb/rx/internal/query/SkipDocumentQueryExecutionContext.java
Outdated
Show resolved
Hide resolved
...n/java/com/microsoft/azure/cosmosdb/rx/internal/query/SkipDocumentQueryExecutionContext.java
Outdated
Show resolved
Hide resolved
sdk/src/test/java/com/microsoft/azure/cosmosdb/rx/OffsetLimitQueryTests.java
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.
Please add some samples in the examples project as later the customers will ask you for samples.
Is there any special support needed for partition split? If so if it is possible it is worth adding some tests covering partition split. (See DocumentProducerTest)
At the moment we have tests for this. Will add samples in seperate PR. Splits should work in the same way as any other query |
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.
Approved with suggestions. My nits aren't worth waiting for tests again, so you can treat them as advice instead.
Review checklist:
- Dependencies - there are no dependencies added or modified
- Public API surface area - there are no changes to the public API surface area
- Functionality - there are changes to the public functionality. This PR impacts query functionality. The SDK now supports SKIP/TAKE with continuation tokens.
- Test coverage - this PR includes sufficient test coverage for the new functionality
- Fundamentals:
- Perf - this should have no impact on perf
- Availability - this should have no impact on availability
- Consistency - this should have no impact on consistency
- Security - this should have no impact on security
- Supportability - this will impact supportability because we added functionality. We should be sure to have samples that cover the new use cases. @mbhaskar - please create a tracking item to add this coverage.
FeedOptions options = new FeedOptions(); | ||
options.setMaxItemCount(pageSize); | ||
options.setEnableCrossPartitionQuery(true); | ||
options.setMaxDegreeOfParallelism(2); |
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.
nit: when you're not using the default values for something that's obviously under test, please either use descriptive variable names or leave comments next to literal usage so explain why you chose that value. In this case, why are we using cross partition and why are we using parallelism of 2? In theory, should we be testing a matrix of these values in e2e tests?
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.
I just followed this pattern from tests for other query types. I will clean this up along with the example
#235 |
Adding support to offset limit queries
This also supports offset-limit queries with continuation token