Repository navigation
Revert "Revert "Evaluate PREWHERE functions of a dictionary-encoded Parquet column once per value"" - #126397
Conversation
…arquet column once per value""
|
Workflow [PR], commit [2104867] Summary: ✅
AI ReviewSummaryThis PR restores evaluation of single-column Missing context / blind spots
Final Verdict✅ Approve, subject to the current CI run completing successfully. |
Since #124131, the only input of the last PREWHERE step on a dictionary-encoded Parquet `String` column is read as dictionary indexes when no earlier step reads it (`decode_dictionary_as_replicated`), and its dictionary values come from `Reader::getDictionaryValues` with `use_string_value_filter = false`. So a single-column `PREWHERE s LIKE '%R%'` no longer passes through `StringValueFilter` and `StringValueFilterValuesReplaced` stays 0, which made the last line of 05339 print 0 on every master run since d64fd50. #124131 adapted 05055 for the same reason (32e261a), but 05339 was added by #124507 after #124131's last CI run, so it was never adapted. Add the same always-true conjunct `AND id < 100000` to the three PREWHERE queries: the conjunct order is kept, so `s` is read by the first of two steps and goes through the masked `Dictionary::appendIndexes` path the test checks. It goes on the two `apply_string_filters_during_scan = 0/1` comparison queries too, because with the single-column shape both arms read indexes and the comparison compared nothing. The reference does not change. Validated on a debug build of d64fd50: the old test fails 6/6, the new one passes 50/50 randomized (66667 replaced, 0 rows read as indexes). Reporting the mask lookups through `updateStats` instead of `updateStatsWithoutPerValueChecks` makes the new test fail 8/8 (5712-6384 replaced). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t-124131-parquet-prewhere-dictionary-replicated Conflicts with the `Parquet` columns cache (#123008): - `ReadManager::read`: keep `convertToFullColumnIfReplicated` with the new `getOrFormOutputColumn(row_group, ...)` signature. - `Reader.cpp`: keep both sets of profile events. - `05055` and `05339`: keep `AND id < 100000` from this PR and `use_columns_cache = 0` from master.
… written to the columns cache After merging master, the column read by the last `PREWHERE` step could be both decoded as a `ColumnReplicated` of dictionary values (`decode_dictionary_as_replicated`) and written to the columns cache (#123008), which would put a `ColumnReplicated` into the cache. Skip `decode_dictionary_as_replicated` for such a column, the same way `string_value_filter` is skipped for it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ues_once` `clickhouse-test` randomizes `use_columns_cache`, and a column that can be written to the columns cache is not decoded as dictionary indexes, which would change the `ParquetRowsDecodedAsDictionaryIndexes` counts the test checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Merged master and pushed
Locally, |
# Conflicts: # src/Processors/Formats/Impl/Parquet/Reader.cpp # src/Processors/Formats/Impl/Parquet/Reader.h
|
🕵 Merged master and pushed
|
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units18 translation units recompiled, 154 s compile time in total, 18 of them have a recent master baseline. |
Reverts #126396
Re-applies #124131 together with the fix for
05339_string_filters_during_scan_parquet_short_dictionary_valuesthat broke master after it was merged.Related: #124131
Related: #126384
Workflow [PR]
Sync PR [sync-upstream/pr/126397]
Version info
26.11.1.497-master(included in26.11and later)