From 6802dca6b5bdc4184cb695683bded223b36102d2 Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Mon, 13 Nov 2023 11:30:28 +0200 Subject: [PATCH] test/cql-pytest: fix select_single_column_relation_test.py to not fail on Cassandra In commit 52bbc1065c8, we started to allow "IN NULL" - it started to match nothing instead of being an error as it is in Cassandra. The commit *incorrectly* "fixed" the existing translated Cassandra unit test to match the new behavior - but after this "fix" the test started to fail on Cassandra. The appropriate fix is just to comment out this part of the test and not do it. It's a small point where we deliberately decided to deviate from Cassandra's behavior, so the test it had for this behavior is irrelevant. Signed-off-by: Nadav Har'El --- .../operations/select_single_column_relation_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py b/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py index 318d32d12f..b049721f22 100644 --- a/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py +++ b/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py @@ -89,7 +89,10 @@ def testClusteringColumnRelations(cql, test_keyspace): ["first", 2, 6, 2], ["first", 3, 7, 3]) - assert_empty(execute(cql, table, "select * from %s where a = ? and b in ? and c in ?", "first", None, [7, 6])) + # Scylla does allow IN NULL (see commit 52bbc1065c8) so this test + # is commented out + #assert_invalid_message(cql, table, "Invalid null value for column b", + # "select * from %s where a = ? and b in ? and c in ?", "first", None, [7, 6]) assert_rows(execute(cql, table, "select * from %s where a = ? and c >= ? and b in (?, ?)", "first", 6, 3, 2), ["first", 2, 6, 2],