Skip to content

Commit

Permalink
tests: add a test case for filtering clustering key
Browse files Browse the repository at this point in the history
The test cases makes sure that clustering key restriction
columns are fetched for filtering if they form a clustering key prefix,
but not a primary key prefix (partition key columns are missing).

Ref scylladb#4541
  • Loading branch information
psarna committed Jun 13, 2019
1 parent 9656396 commit d4ba5cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/filtering_test.cc
Expand Up @@ -791,6 +791,13 @@ SEASTAR_TEST_CASE(test_allow_filtering_with_secondary_index) {
}
});
});

eventually([&] {
auto msg = e.execute_cql("SELECT SUM(e) FROM t WHERE c = 5 AND b = 911 ALLOW FILTERING;").get0();
assert_that(msg).is_rows().with_rows({{ int32_type->decompose(0), {} }});
msg = e.execute_cql("SELECT e FROM t WHERE c = 5 AND b = 3 ALLOW FILTERING;").get0();
assert_that(msg).is_rows().with_rows({{ int32_type->decompose(9), int32_type->decompose(3) }});
});
});
}

Expand Down

0 comments on commit d4ba5cc

Please sign in to comment.