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
DISTINCT is ignored with IN restrictions #2837
Comments
The problematic part of the query (and query processing) is not in the distinct notation ,but the list of none unique values of the "IN" clause. this will trigger multiple executors on the same partition each of which will return the same result set, the combined result set will simply contain duplicates. will submit a patch to make the values list unique before execution. |
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
avikivity
pushed a commit
that referenced
this issue
Aug 26, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes #2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com> (cherry picked from commit d734d31)
syuu1228
pushed a commit
to syuu1228/scylla
that referenced
this issue
Sep 22, 2018
When the list of values in the IN list of a single column contains duplicates, multiple executors are activated since the assumption is that each value in the IN list corresponds to a different partition. this results in the same row appearing in the result number times corresponding to the duplication of the partition value. Added queries for the in restriction unitest and fixed with a bad result check. Fixes scylladb#2837 Tests: Queries as in the usecase from the GitHub issue in both forms , prepared and plain (using python driver),Unitest. Signed-off-by: Eliran Sinvani <eliransin@scylladb.com> Message-Id: <ad88b7218fa55466be7bc4303dc50326a3d59733.1534322238.git.eliransin@scylladb.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when using IN restrictions DISTINCT is not applied to result set returned
cassandra 2.2.9
scylla
The text was updated successfully, but these errors were encountered: