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

Duplicate results when DISTINCT querying #367

Open
MiDoWD opened this issue Nov 20, 2020 · 0 comments
Open

Duplicate results when DISTINCT querying #367

MiDoWD opened this issue Nov 20, 2020 · 0 comments

Comments

@MiDoWD
Copy link

MiDoWD commented Nov 20, 2020

Describe the bug
DISTINCT query via the 2.6.11 Java async SDK is returning duplicate results.

To Reproduce
Via the 2.6.11 Java async SDK I am querying documents with query which looks like

SELECT DISTINCT o.nest1.nest2.field as id FROM Objects o

with

    FeedOptions queryOptions = new FeedOptions();
    queryOptions.setMaxItemCount(10);
    queryOptions.setEnableCrossPartitionQuery(true);

The database has ~750 entries with 40 distinct values of this key. However after iterating all results from the pages I get, there are 69 of them, containing some duplicate ids.
When I run the same query via the Portal UI, I get the expected 40 results.
When I change the setMaxItemCount to 1000, I get the expected 40 results.

Not sure whether it's relevant, but the database uses this field o.nest1.nest2.field as partition key.

Expected behavior
DISTINCT query should not return repeated entries.

Actual behavior
Repeated entries are seen (69 entries for 40 distinct values).

Environment summary
SDK Version: 2.6.11 (first seen on 2.6.3, update did not help)
Java JDK version: 1.8.0_15 (same seen on JDK 11)
OS Version: seen both on MacOS and Linux.

Additional context

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

1 participant