mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-01 13:45:53 +00:00
This is a translation of Cassandra's CQL unit test source file validation/operations/SelectSingleColumnRelationTest.java into our cql-pytest framework. This test file includes 23 tests for various types of SELECT operations which involve relations, a.k.a expressions (i.e., WHERE). All 23 tests pass on Cassandra. 3 of the tests fail on Scylla reproducing 2 already known Scylla issues and three minor previously-unknown issues: Previously known issues: Refs #2962: Collection column indexing Refs #10358: Comparison with UNSET_VALUE should produce an error Three new (and minor) issue: Refs #10577: Is max-clustering-key-restrictions-per-query too low? Refs #10631: Invalid IN restriction is reported as a '=' restriction Refs #10632: Column name printed in a strange way in error message NOTE: Scylla supports some expressions which Cassandra does not. In some cases the Cassandra unit test had checks that certain constructs are not allowed, and I had to comment out such checks when the expression *does* work in Scylla. But of course, in such cases, it is not enough to comment out a check - we also need to verify that Scylla's unique behavior is the correct one. For that, we will have separate cql-pytest test for those features - they won't be in the translated Cassandra unit tests (of course). For example, in this test I had to comment out a check that filtering on *non*-frozen UDTs is not allowed. In a separate patch which I'm sending in parallel, I added a new test - test_filter_UDT_restriction_nonfrozen - which will verify that what Scylla does in that case is the correct behavior. Signed-off-by: Nadav Har'El <nyh@scylladb.com>