From 3d5ad2b41662436b48f732db3bdb1cf52bacc5a7 Mon Sep 17 00:00:00 2001 From: Mikhail Filimonov Date: Sun, 8 Nov 2026 23:36:03 +0100 Subject: [PATCH] Update 02841_parquet_filter_pushdown reference for nullable min/max pruning https://github.com/Altinity/ClickHouse/pull/2657 (a7561812f25) lets Parquet row-group pruning skip a nullable column whose non-null range misses the predicate, so the five `-- quirk with infinities` queries now read only the row groups a non-nullable column would. The reference still carried the over-reading values; the sequential stateless jobs were dropped on that PR, so the mismatch surfaced on the next PR. Verified with a local A/B of the same ASan build with the PR 2657 source change reverted: the old reference passes there, the new one passes with the change, and the real (non-indexHint) filter results are identical on both. CI: https://altinity-build-artifacts.s3.amazonaws.com/json.html?PR=2805&sha=ad04f95e44190bff34b9e5330054a01abaa848ec&name_0=PR PR: https://github.com/Altinity/ClickHouse/pull/2805 Co-Authored-By: Claude Fable 5.1 Signed-off-by: Mikhail Filimonov --- .../0_stateless/02841_parquet_filter_pushdown.reference | 8 ++++---- .../queries/0_stateless/02841_parquet_filter_pushdown.sql | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/queries/0_stateless/02841_parquet_filter_pushdown.reference b/tests/queries/0_stateless/02841_parquet_filter_pushdown.reference index bc5cb539916e2..7bea51f532f78 100644 --- a/tests/queries/0_stateless/02841_parquet_filter_pushdown.reference +++ b/tests/queries/0_stateless/02841_parquet_filter_pushdown.reference @@ -73,14 +73,14 @@ mostly_null_lc Nullable(String) 200 179900 200 19900 200 19900 -600 259700 -600 259700 +200 19900 +200 19900 # Settings that affect the table schema or contents -500 244750 -500 244750 0 0 500 244750 +0 0 500 244750 +0 0 500 244750 500 244750 # Bad type conversions diff --git a/tests/queries/0_stateless/02841_parquet_filter_pushdown.sql b/tests/queries/0_stateless/02841_parquet_filter_pushdown.sql index 93073925e8a23..aec4b776c2645 100644 --- a/tests/queries/0_stateless/02841_parquet_filter_pushdown.sql +++ b/tests/queries/0_stateless/02841_parquet_filter_pushdown.sql @@ -119,7 +119,7 @@ select count(), sum(number) from file('02841.parquet') where indexHint(never_nul select count(), sum(number) from file('02841.parquet') where indexHint(never_null_lc > 850); select count(), sum(number) from file('02841.parquet') where indexHint(never_null < 150); select count(), sum(number) from file('02841.parquet') where indexHint(never_null_lc < 150); --- Quirk with infinities: this reads too much because KeyCondition represents NULLs as infinities. +-- NULLs do not widen the min/max range: a nullable column prunes like a non-nullable one when NULL cannot satisfy the predicate. select count(), sum(number) from file('02841.parquet') where indexHint(sometimes_null < 150); select count(), sum(number) from file('02841.parquet') where indexHint(sometimes_null_lc < 150); @@ -131,11 +131,11 @@ insert into function file('02841.parquet') select if(number%234 == 0, NULL, 'I am a string') as string_or_null from numbers(1000); -select count(), sum(number) from file('02841.parquet') where indexHint(positive_or_null < 50); -- quirk with infinities +select count(), sum(number) from file('02841.parquet') where indexHint(positive_or_null < 50); select count(), sum(number) from file('02841.parquet', Parquet, 'number UInt64, positive_or_null UInt64') where indexHint(positive_or_null < 50); select count(), sum(number) from file('02841.parquet') where indexHint(negative_or_null > -50); select count(), sum(number) from file('02841.parquet', Parquet, 'number UInt64, negative_or_null Int64') where indexHint(negative_or_null > -50); -select count(), sum(number) from file('02841.parquet') where indexHint(string_or_null == ''); -- quirk with infinities +select count(), sum(number) from file('02841.parquet') where indexHint(string_or_null == ''); -- Parquet index analysis doesn't support empty() function yet select count(), sum(number) from file('02841.parquet', Parquet, 'number UInt64, string_or_null String') where indexHint(string_or_null == '') settings optimize_empty_string_comparisons = 0;