If a regular row isn't present, no regular column restriction (say, r=3) can pass since all regular columns are presented as NULL, and we don't have an IS NULL predicate. Yet we just ignore it. Handle the restriction on a missing column by return false, signifying the row was filtered out. We have to move the check after the conditional checking whether there's any restriction at all, otherwise we exit early with a false failure. Unit test marked xfail on this issue are now unmarked. A subtest of test_tombstone_limit is adjusted since it depended on this bug. It tested a regular column which wasn't there, and this bug caused the filter to be ignored. Change to test a static column that is there. A test for a bug found while developing the patch is also added. It is also tested by test_tombstone_limit, but better to have a dedicated test. Fixes #10357 Closes scylladb/scylladb#20486
All tests in this directory and its subdirectories were translated from Apache Cassandra's unit tests - the test/unit/org/apache/cassandra/cql3 directory in the Apache Cassandra source code repository. The organization of this directory mirrors that of the Cassandra directory, with test files renamed from SomeThingTest.java to some_thing_test.py. Individual files were translated in their entirety, and each individual file includes a comment on which version of the file was translated (Cassandra's tests continue to evolve, so we may later want to catch up with the differences). Please avoid adding new tests, not translated from Cassandra, in this directory. Instead, place new tests written from scratch for Scylla, or improved tests, in the directory above.