Repository navigation
Add regression test for set skip index with IS TRUE / IS FALSE / IS UNKNOWN - #105865
Conversation
…NKNOWN Verifies that the set skip index prunes granules for the new truth-value predicates from ClickHouse#99997 on a `Nullable(Bool)` column. The new test populates three granules of eight rows each (only true, only false, only NULL) and checks via `ProfileEvents['SelectedMarks']` that the index drops the two unrelated granules for each positive form and the matching granule for each `IS NOT` form. Follow-up to ClickHouse#99997.
|
Pre-PR validation gate (test-only PR):
session: cron:clickhouse-ci-task-worker:20260526-144500 |
|
Workflow [PR], commit [8de2d98] Summary: ✅ AI ReviewSummaryThis PR adds stateless regression coverage for Final VerdictStatus: ✅ Approve |
|
@groeneai can you check the test failures? |
|
Triaged both failures. Both are chronic trunk issues unrelated to this PR. This PR is test-only: 2 files in 1. Stress test (arm_release) --
|
|
@groeneai can you add a primary key test to check that it is also used with these predicates? |
Sibling of `04290_set_index_is_true_false_unknown` covering the leading primary-key path on a `Nullable(Bool)` column. `KeyCondition` recognises the `isNull` / `isNotNull` lowered forms and drops one granule for `IS UNKNOWN` and `IS NOT UNKNOWN`. The other four predicates lower to `isNotDistinctFrom` / `isDistinctFrom`, which are not recognised by `KeyCondition`, so the test pins this current behaviour. Follow-up to ClickHouse#99997. Requested in ClickHouse#105865.
Head branch was pushed to by a user without write access
|
@PedroTadim added Same 24-row, three-granule layout ( Observed
|
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 345 line(s), 19 function(s) across 121 file(s) · Details Top files
|
edddce5
Follow-up to #99997 (which added the SQL truth-value predicates
IS TRUE,IS FALSE,IS UNKNOWN, and theirIS NOTvariants). @PedroTadim asked on the inline review whether the set skip index is used for these predicates on aNullable(Bool)column.The answer is yes, the set index already prunes granules in all six cases because the new predicates lower to functions the set index recognises at the atom level (
isNotDistinctFrom(b, true|false),isNull(b),isDistinctFrom(b, true|false),isNotNull(b)). This PR pins that behaviour with a regression test.The test creates a
MergeTreetable withindex_granularity = 8and inserts 24 rows arranged so the three granules contain only true, only false, and only NULL values respectively. For each predicate it asserts:count()returns the right number of matching rows.ProfileEvents['SelectedMarks']shows the set index dropped the two unrelated granules forIS TRUE/IS FALSE/IS UNKNOWN(1/3 granules read) and the matching granule for theIS NOTforms (2/3 granules read).Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes