-
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
Implement Cosmos pagination #34103
Implement Cosmos pagination #34103
Conversation
...osmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.PagingQueryingEnumerable.cs
Show resolved
Hide resolved
...osmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.PagingQueryingEnumerable.cs
Show resolved
Hide resolved
@@ -5324,6 +5324,65 @@ SELECT c | |||
"""); | |||
}); | |||
|
|||
[ConditionalFact] | |||
public virtual async Task ToPageAsync() |
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.
Also add a test where responseContinuationTokenLimitInKb
value matters.
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.
That's trickier than it looks - even setting this to 1kb (the minimum) still passes the test. I suspect that more complex query shapes (and possibly later pages??) should make it go over 1kb, at which point we can assert a failure, but that seems brittle and dependent on internal Cosmos stuff. I've debugged to manually confirm that the value gets passed into the QueryRequestOptions - do you have some other idea on what to do here?
@AndriySvyryd thanks for the reviewing - pushed some changes, please take a look. Note especially the commit switching to use ResponseMessageEnumerator for regular document enumeration (and fixing #34092) - can you please take a close look? |
Design decisions:
|
@dotnet/efteam made the changes as per our decision decisions. |
This didn't turn out to be very hard - check out the test to see it in action.
Suggestions for additional testing scenarios would be appreciated!
Closes #24513