-
Notifications
You must be signed in to change notification settings - Fork 1.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
LIMIT is not doing it right when using GROUP BY #5362
Comments
could be resolved by same PR as #5361 , but reporting apart as it doesn't behave the same. |
See diagnosis here: #5361 (comment) |
This issue is also reproduced by the Cassandra unit test which I'm translating now, |
This is a translation of Cassandra's CQL unit test source file validation/operations/CompactStorageTest.java into our cql-pytest framework. This very large test file includes 86 tests for various types of operations and corner cases of WITH COMPACT STORAGE tables. All 86 tests pass on Cassandra (except one using a deprecated feature that needs to be specially enabled). 30 of the tests fail on Scylla reproducing 7 already-known Scylla issues and 7 previously-unknown issues: Already known issues: Refs scylladb#3882: Support "ALTER TABLE DROP COMPACT STORAGE" Refs scylladb#4244: Add support for mixing token, multi- and single-column restrictions Refs scylladb#5361: LIMIT doesn't work when using GROUP BY Refs scylladb#5362: LIMIT is not doing it right when using GROUP BY Refs scylladb#5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs scylladb#7735: CQL parser missing support for Cassandra 3.10's new "+=" syntax Refs scylladb#8627: Cleanly reject updates with indexed values where value > 64k New issues: Refs scylladb#12471: Range deletions on COMPACT STORAGE is not supported Refs scylladb#12474: DELETE prints misleading error message suggesting ALLOW FILTERING would work Refs scylladb#12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs scylladb#12479: SELECT DISTINCT should refuse GROUP BY with clustering column Refs scylladb#12526: Support filtering on COMPACT tables Refs scylladb#12749: Unsupported empty clustering key in COMPACT table Refs scylladb#12815: Hidden column "value" in compact table isn't completely hidden Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/CompactStorageTest.java into our cql-pytest framework. This very large test file includes 86 tests for various types of operations and corner cases of WITH COMPACT STORAGE tables. All 86 tests pass on Cassandra (except one using a deprecated feature that needs to be specially enabled). 30 of the tests fail on Scylla reproducing 7 already-known Scylla issues and 7 previously-unknown issues: Already known issues: Refs #3882: Support "ALTER TABLE DROP COMPACT STORAGE" Refs #4244: Add support for mixing token, multi- and single-column restrictions Refs #5361: LIMIT doesn't work when using GROUP BY Refs #5362: LIMIT is not doing it right when using GROUP BY Refs #5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs #7735: CQL parser missing support for Cassandra 3.10's new "+=" syntax Refs #8627: Cleanly reject updates with indexed values where value > 64k New issues: Refs #12471: Range deletions on COMPACT STORAGE is not supported Refs #12474: DELETE prints misleading error message suggesting ALLOW FILTERING would work Refs #12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs #12479: SELECT DISTINCT should refuse GROUP BY with clustering column Refs #12526: Support filtering on COMPACT tables Refs #12749: Unsupported empty clustering key in COMPACT table Refs #12815: Hidden column "value" in compact table isn't completely hidden Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #12816
This is a translation of Cassandra's CQL unit test source file validation/operations/CompactStorageTest.java into our cql-pytest framework. This very large test file includes 86 tests for various types of operations and corner cases of WITH COMPACT STORAGE tables. All 86 tests pass on Cassandra (except one using a deprecated feature that needs to be specially enabled). 30 of the tests fail on Scylla reproducing 7 already-known Scylla issues and 7 previously-unknown issues: Already known issues: Refs #3882: Support "ALTER TABLE DROP COMPACT STORAGE" Refs #4244: Add support for mixing token, multi- and single-column restrictions Refs #5361: LIMIT doesn't work when using GROUP BY Refs #5362: LIMIT is not doing it right when using GROUP BY Refs #5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs #7735: CQL parser missing support for Cassandra 3.10's new "+=" syntax Refs #8627: Cleanly reject updates with indexed values where value > 64k New issues: Refs #12471: Range deletions on COMPACT STORAGE is not supported Refs #12474: DELETE prints misleading error message suggesting ALLOW FILTERING would work Refs #12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs #12479: SELECT DISTINCT should refuse GROUP BY with clustering column Refs #12526: Support filtering on COMPACT tables Refs #12749: Unsupported empty clustering key in COMPACT table Refs #12815: Hidden column "value" in compact table isn't completely hidden Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #12816
This issue is also reproduced by an integration test in Java Driver 3.x: https://github.com/scylladb/java-driver/blob/b3f3ebaf161b21e5c4840ec294595d4e4b39d9bf/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java#L636 |
Updated list of tests reproducing this issue: cql-pytest:
Tests that currently fail on many different issues (so fixing this issue won't make them pass):
Java Driver integration test: Additionally, dtest's |
This is a translation of Cassandra's CQL unit test source file validation/operations/SelectGroupByTest.java into our cql-pytest framework. This test file contains only 8 separate test functions, but each of them is very long checking hundreds of different combinations of GROUP BY with other things like LIMIT, ORDER BY, etc., so 6 out of the 7 tests fail on Scylla on one of the bugs listed below - most of the tests actually fail in multiple places due to multiple bugs. All tests pass on Cassandra. The tests reproduce six already-known Scylla issues and one new issue: Already known issues: Refs scylladb#2060: Allow mixing token and partition key restrictions Refs scylladb#5361: LIMIT doesn't work when using GROUP BY Refs scylladb#5362: LIMIT is not doing it right when using GROUP BY Refs scylladb#5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs scylladb#12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs scylladb#12479: SELECT DISTINCT should refuse GROUP BY with clustering column A new issue discovered by these tests: Refs scylladb#13109: Incorrect sort order when combining IN, GROUP BY and ORDER BY Signed-off-by: Nadav Har'El <nyh@scylladb.com>
The translated Cassandra unit tests in cassandra_tests/validation/operations/ reproduced three bugs in GROUP BY's interaction with LIMIT and PER PARTITION LIMIT - issue scylladb#5361, scylladb#5362 and scylladb#5363. Unfortunately, those test functions are very long, and each test fails on all of these issues and a few more, making it difficult to use these tests to verify when those tests have been fixed. In other words, ideally a patch for issue 5361 should un-xfail some reproducing test for this issue - but all the existing tests will continue to fail after fixing 5361, because of other remaining bugs. So in this patch, I created a new test file test_group_by.py with my own tests for the GROUP BY feature. I tried to explore the different capabilities of the GROUP BY feature, its different success and error paths, and how GROUP BY interacts with LIMIT and PER PARTITION LIMIT. As usual, I created many small test functions and not one huge test function, and as a result we now have 5 xfailing tests which each reproduces one bug and when the bug is fixed, it will start to pass. All tests added here pass on Cassandra. Refs scylladb#5361 Refs scylladb#5362 Refs scylladb#5363 Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This is a translation of Cassandra's CQL unit test source file validation/operations/SelectGroupByTest.java into our cql-pytest framework. This test file contains only 8 separate test functions, but each of them is very long checking hundreds of different combinations of GROUP BY with other things like LIMIT, ORDER BY, etc., so 6 out of the 7 tests fail on Scylla on one of the bugs listed below - most of the tests actually fail in multiple places due to multiple bugs. All tests pass on Cassandra. The tests reproduce six already-known Scylla issues and one new issue: Already known issues: Refs #2060: Allow mixing token and partition key restrictions Refs #5361: LIMIT doesn't work when using GROUP BY Refs #5362: LIMIT is not doing it right when using GROUP BY Refs #5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs #12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs #12479: SELECT DISTINCT should refuse GROUP BY with clustering column A new issue discovered by these tests: Refs #13109: Incorrect sort order when combining IN, GROUP BY and ORDER BY Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #13126
The translated Cassandra unit tests in cassandra_tests/validation/operations/ reproduced three bugs in GROUP BY's interaction with LIMIT and PER PARTITION LIMIT - issue #5361, #5362 and #5363. Unfortunately, those test functions are very long, and each test fails on all of these issues and a few more, making it difficult to use these tests to verify when those tests have been fixed. In other words, ideally a patch for issue 5361 should un-xfail some reproducing test for this issue - but all the existing tests will continue to fail after fixing 5361, because of other remaining bugs. So in this patch, I created a new test file test_group_by.py with my own tests for the GROUP BY feature. I tried to explore the different capabilities of the GROUP BY feature, its different success and error paths, and how GROUP BY interacts with LIMIT and PER PARTITION LIMIT. As usual, I created many small test functions and not one huge test function, and as a result we now have 5 xfailing tests which each reproduces one bug and when the bug is fixed, it will start to pass. All tests added here pass on Cassandra. Refs #5361 Refs #5362 Refs #5363 Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #13136
This is a translation of Cassandra's CQL unit test source file validation/operations/CompactStorageTest.java into our cql-pytest framework. This very large test file includes 86 tests for various types of operations and corner cases of WITH COMPACT STORAGE tables. All 86 tests pass on Cassandra (except one using a deprecated feature that needs to be specially enabled). 30 of the tests fail on Scylla reproducing 7 already-known Scylla issues and 7 previously-unknown issues: Already known issues: Refs #3882: Support "ALTER TABLE DROP COMPACT STORAGE" Refs #4244: Add support for mixing token, multi- and single-column restrictions Refs #5361: LIMIT doesn't work when using GROUP BY Refs #5362: LIMIT is not doing it right when using GROUP BY Refs #5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs #7735: CQL parser missing support for Cassandra 3.10's new "+=" syntax Refs #8627: Cleanly reject updates with indexed values where value > 64k New issues: Refs #12471: Range deletions on COMPACT STORAGE is not supported Refs #12474: DELETE prints misleading error message suggesting ALLOW FILTERING would work Refs #12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs #12479: SELECT DISTINCT should refuse GROUP BY with clustering column Refs #12526: Support filtering on COMPACT tables Refs #12749: Unsupported empty clustering key in COMPACT table Refs #12815: Hidden column "value" in compact table isn't completely hidden Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #12816 (cherry picked from commit 328cdb2)
This is a translation of Cassandra's CQL unit test source file validation/operations/CompactStorageTest.java into our cql-pytest framework. This very large test file includes 86 tests for various types of operations and corner cases of WITH COMPACT STORAGE tables. All 86 tests pass on Cassandra (except one using a deprecated feature that needs to be specially enabled). 30 of the tests fail on Scylla reproducing 7 already-known Scylla issues and 7 previously-unknown issues: Already known issues: Refs #3882: Support "ALTER TABLE DROP COMPACT STORAGE" Refs #4244: Add support for mixing token, multi- and single-column restrictions Refs #5361: LIMIT doesn't work when using GROUP BY Refs #5362: LIMIT is not doing it right when using GROUP BY Refs #5363: PER PARTITION LIMIT doesn't work right when using GROUP BY Refs #7735: CQL parser missing support for Cassandra 3.10's new "+=" syntax Refs #8627: Cleanly reject updates with indexed values where value > 64k New issues: Refs #12471: Range deletions on COMPACT STORAGE is not supported Refs #12474: DELETE prints misleading error message suggesting ALLOW FILTERING would work Refs #12477: Combination of COUNT with GROUP BY is different from Cassandra in case of no matches Refs #12479: SELECT DISTINCT should refuse GROUP BY with clustering column Refs #12526: Support filtering on COMPACT tables Refs #12749: Unsupported empty clustering key in COMPACT table Refs #12815: Hidden column "value" in compact table isn't completely hidden Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #12816 (cherry picked from commit 328cdb2) (cherry picked from commit e11561e) Modified for 5.1 to comment out error-path tests for "unset" values what are silently ignored (instead of being detected) in this version.
as mentioned on #5361 , this is an effort for testing #2206 , and LIMIT is not behaving as expected (and not accordingly with C*):
The text was updated successfully, but these errors were encountered: