Repository navigation
Apply string filters during scan to DELTA_BYTE_ARRAY Parquet pages (follow-up to #115848) - #124503
Conversation
`columns_read_before_filter` holds the names of the inputs of the existing `PREWHERE`, the row policy and `__topKFilter`, which may be subcolumns (e.g. `payload.size0`), while the reader disables the scan-time string filter per storage column. Resolve these names to storage columns before checking whether a condition is suitable for the relaxed move to `PREWHERE`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`PageDecoderInfo::makeDecoder` did not pass the string value filter to `DeltaByteArrayDecoder`, so `apply_string_filters_during_scan` had no effect on `BYTE_ARRAY` pages in the `DELTA_BYTE_ARRAY` encoding. The values still have to be reconstructed (each one depends on the previous one), but the ones that do not match the filter are now inserted as empty strings, and the selectivity statistics are updated. The test uses a small file written by pyarrow, because ClickHouse does not write this encoding. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [e7f6c27] Summary: ✅
AI ReviewSummaryThis PR closes the two follow-up gaps from Missing context / blind spots
Final Verdict✅ No new findings. The current diff looks correct to me; merge once the remaining CI finishes green. LLVM Coverage ReportMeasured on commit e7f6c27.
Changed lines: Changed C/C++ lines covered: 62/78 (79.49%) · Uncovered code |
|
📊 Cloud Performance Report
This PR does two things: it applies PREWHERE string filters inside the Parquet DELTA_BYTE_ARRAY decoder, and it makes MergeTreeWhereOptimizer match columns read before the filter by their storage name, so subcolumns such as payload.size0 count for their parent column. ClickBench reads a MergeTree table with plain String columns. The Parquet decoder is never used there, and for flat columns the storage name is the same as the column name, so the planner change does not alter which filters apply. Neither flagged query can be tied to the diff. Q28 (+6.3%) falls inside master's normal range and its PR runs were noisy. Q33 (-6.6%) is marked not_sure because master's timings for it recently shifted. No query in clickbench or tpch_adapted_1_official shows a change caused by this PR. clickbenchFlagged queries (2 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
Build profile diff (arm_release)Commit See the job log for details. |
…ad without the string filter `PageDecoderInfo::makeDecoder` does not pass the `StringValueFilter` to `DeltaByteArrayDecoder`, so the setting is a no-op for such pages until #124503 is merged. Narrow the advertised support accordingly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_parquet_load_2` The test loads every file in `data_parquet`, so the new fixture changed its output. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=124503&sha=latest&name_0=PR&name_1=Stateless%20tests%20(arm_binary%2C%20parallel) #124503 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pushdown-review-followup
…rging master Master now applies the string filter to `DELTA_BYTE_ARRAY` Parquet pages (#124503), so the setting description no longer says that such pages are read without it. The dictionary pruning case of `05055_string_filters_during_scan_parquet` is restored to the version from master: dictionary-encoded rows no longer participate in the short value cutoff, so the longer non-matching values are not needed. The new test is renumbered to `05339`, because master added another `05338` test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-up to #115848, which handles the two review comments left on it after it entered the merge queue (the queued branch cannot be updated). This branch sits on top of the head of #115848. Once that PR merges, the diff here shrinks to the two commits below.
DeltaByteArrayDecodernow receives the string value filter. Before this,apply_string_filters_during_scandid nothing for ParquetBYTE_ARRAYpages in theDELTA_BYTE_ARRAYencoding. Each value still has to be rebuilt, because it depends on the previous one, but values that do not match are inserted as empty strings and the filter's selectivity statistics are updated. The new test uses a small file written by pyarrow.MergeTreeWhereOptimizernow maps the columns read before the filter (existingPREWHERE, row policy,__topKFilter) to their storage columns before deciding on the relaxed move toPREWHERE. This matches how the reader decides when to turn the filter off.Related: #115848
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
apply_string_filters_during_scannow also applies to Parquet string pages in theDELTA_BYTE_ARRAYencoding.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/124503]
Version info
26.10.1.1868-master(included in26.10and later)