From 9197c9466c4e7ac0965f07a7efd28476ae2d8e34 Mon Sep 17 00:00:00 2001 From: Yaniv Michael Kaul Date: Mon, 11 May 2026 18:32:24 +0300 Subject: [PATCH] test: add cross-partition static column assertion to testStaticColumnsWithSecondaryIndex Add a second partition (k=1) with a different static value (s=99) and verify that a secondary index query returns the correct static column values across partitions. This covers the gap identified in dtest cql_static_columns_tests.py, allowing its removal. Refs: SCYLLADB-1922 --- .../validation/entities/static_columns_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/cqlpy/cassandra_tests/validation/entities/static_columns_test.py b/test/cqlpy/cassandra_tests/validation/entities/static_columns_test.py index dac3880fc8..d66b9dfedf 100644 --- a/test/cqlpy/cassandra_tests/validation/entities/static_columns_test.py +++ b/test/cqlpy/cassandra_tests/validation/entities/static_columns_test.py @@ -92,6 +92,12 @@ def testStaticColumnsWithSecondaryIndex(cql, test_keyspace): # Reproduces issue #8869: assert_rows(execute(cql, table, "SELECT s FROM %s WHERE v = 1"), [42], [42]) + # Cross-partition static column query via secondary index + # (covers the gap from dtest cql_static_columns_tests.py) + execute(cql, table, "INSERT INTO %s (k, p, s, v) VALUES (1, 0, 99, 1)") + assert_rows_ignoring_order(execute(cql, table, "SELECT * FROM %s WHERE v = 1"), + [0, 0, 42, 1], [0, 1, 42, 1], [1, 0, 99, 1]) + def checkDistinctRows(rows, sort, *ranges): assert len(ranges) % 2 == 0 numdim = len(ranges) // 2