Skip to content
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

Non null ContinuationToken json but null token value #119

Open
sophiaso opened this issue Aug 20, 2018 · 1 comment
Open

Non null ContinuationToken json but null token value #119

sophiaso opened this issue Aug 20, 2018 · 1 comment

Comments

@sophiaso
Copy link

sophiaso commented Aug 20, 2018

When querying with pagination for partitioned collection, for the last page, the pagination token is not null, but the token field is null. e.g.,

{"token":null,"range":{"max":"05C1D9CD673398","min":"05C1C9CD673398","isMinInclusive":true,"isMaxInclusive":false}}

Does above token indicate it's already the last page? Though in my case, it's actually the last page, besides the whole json itself is not null.

Similar issue here:
https://stackoverflow.com/a/51868733

The explanation was:
"As for why the SDK does not just give a json null value for the continuation token: The SDK has reached the end for a given partition but mstill needs to visit other partitions to know for sure that there are no more documents that match your filter / need to be returned to the client."

But it's unclear whether should the user treat this as last page. @aliuy
Any help?

@ausfeldt
Copy link

ausfeldt commented Sep 6, 2018

@sophiaso A null token is the last page for a given partition range. If it is the last page of data on the last partition range, then the whole json itself will be null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants