Repository navigation
Conversation
The row groups of an Iceberg data file are skipped by a finished JOIN runtime filter since ClickHouse#129717, but inside a row group that is kept every page of every read column was still decoded: page pruning (`applyColumnIndex`) only received the single-column conditions of the query's own filter and of spatial predicates, never of the runtime `KeyCondition`. Give the page index the single-column conditions of the same runtime `KeyCondition`, appended after the static and spatial ones, the way spatial conditions are added. A page counts as pruned by the runtime filter only when the first condition that rules it out is a runtime one, i.e. every other condition of the column passed (the same rule as for row groups). The counter is atomic because `applyColumnIndex` runs concurrently for different row groups and columns, and `isJoinRuntimeFilterApplied` now also reports pruned pages, so a read that skipped pages writes neither a query condition cache entry (a row group whose pages were all skipped would be cached as unmatched) nor a cached row count. Malformed page statistics of a column that only runtime conditions use do not fail the read; the column is just not pruned, as for its row group statistics. No new setting; `input_format_parquet_page_filter_push_down` disables it. New profile event `ParquetRuntimeFilterPrunedPages`. Test 05457_iceberg_join_runtime_filter_page_pruning, and one query on a file with 20,000-row pages in join_runtime_filter.xml. Related: ClickHouse#128108 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uning 05457 gets a case with a data file whose column index of the join key is overwritten with bytes that cannot be parsed (same size, so the manifest still matches): the runtime filter skips no page of it and the read returns the same rows, while the query's own filter on that column still fails with INCORRECT_DATA, as before. Case W now has a filter of the query on the join key too, so a page that the query's filter rules out first is not counted as pruned by the runtime filter (13 of the 14 pages of `k`). Comment of the query condition cache guard: it covers pages too. Related: ClickHouse#128108 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 3 findings in the first pass, 0 in the delta recheck of the fix round).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-11:20261111-171300 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261111-165100 |
|
Workflow [PR], commit [2732bb4] Summary: ✅
AI ReviewSummaryReviewed #130906 at Final Verdict✅ Approve — no new inline findings or existing review threads requiring action. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units19 translation units recompiled, 168 s compile time in total, 19 of them have a recent master baseline. |
…ime-filter-page-pruning
…hout parallel replicas The query of the layout counted ParquetPrunedPages of the initial query, which reads nothing when parallel replicas read the table, so it was 0 in the ParallelReplicas job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each of `column_conditions` and `join_runtime_filter_column_conditions` is filled once, so the conditions are extracted at the call sites and the lambda only wires them to the columns. The test keeps the cases of the page level: an exact set of keys, together with a filter of the query, the query condition cache and a page index that cannot be parsed. The cases of the runtime KeyCondition (the min/max range, casts, a Nullable key, LEFT ANTI, more threads, position deletes, the row count cache) are covered by 05457_iceberg_join_runtime_filter_row_group_pruning; the page level consumes the same condition. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ime-filter-page-pruning
CI finish ledger - 0a7ed23Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
CIDB has no other Session id: cron:clickhouse-maint-slot-19:20261112-202200 |
…ime-filter-page-pruning # Conflicts: # src/Core/Settings.cpp
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Public CI on 2732bb4 has no failures: the linked report shows 112 jobs OK, 87 skipped and 0 failed, and CIDB has no failed test rows for this commit. I don't have access to the private sync PR, so I can't see those 11 failures. If you paste the failing test names or their report links here, I'll check them against this change (Parquet page filtering of Iceberg reads by JOIN runtime filters) and fix them or link existing fixes. |
|
Fixing PR for the |
…eberg_pruning docs The description of `use_join_runtime_filters_for_iceberg_pruning`, extended in ClickHouse#130906, linked the format setting `input_format_parquet_page_filter_push_down` with a bare `#anchor`. The docs generator resolves a bare fragment only within the page's own settings family, so it was emitted as `/reference/settings/session-settings/other#input_format_parquet_page_filter_push_down`, a page without that heading, and the link check of the daily reference-docs regeneration PR failed: [./reference/settings/session-settings/use.mdx]: [ERROR] reference/settings/session-settings/other#input_format_parquet_page_filter_push_down (at 175:425) | Cannot find fragment https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131561&sha=7b75bf04b887453e5e5380b7b979224f0182829c&name_0=PR&name_1=Docs%20check%20%28Mintlify%29 Use the absolute shard route, as the first link of the same sentence already does, and repair the garbled clause "pages that and": page pruning by the runtime filter needs both Parquet filter push-down settings. Validated by regenerating the docs locally with the generator the robot runs and running `lychee_check.py --mode links`: 1 error (the one above) with the base binary, 0 errors with the fixed one. Related: ClickHouse#130906 Related: ClickHouse#131561 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #128108
Related: #129717
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Iceberg reads now skip the Parquet pages of data files whose page index shows they cannot contain a key of a JOIN runtime filter. Controlled by the setting
use_join_runtime_filters_for_iceberg_pruning.Description
Depends on #129717; only the last two commits are new.
#129717 skips the row groups of an Iceberg data file that cannot match a finished JOIN runtime filter. In a kept row group every page is still decoded, even where the page index proves it cannot hold a key: page pruning only got the query's own filter and spatial predicates. This PR adds the single-column conditions of the runtime
KeyCondition, soapplyColumnIndexskips those pages and the other columns read only the remaining rows.ParquetRuntimeFilterPrunedPages.input_format_parquet_filter_push_downandinput_format_parquet_page_filter_push_down(both on by default).The gain needs several pages per row group: Spark and other parquet-mr writers start a page every 20,000 rows (Iceberg
write.parquet.page-row-limit); ClickHouse cuts pages by size, often one per row group for a sorted key.TPC-DS SF1 on Iceberg, release build vs #129717, each fact table one data file sorted by the date key with 1M-row row groups and 20,000-row pages: 99 queries 11.9 -> 10.4 s at 4 threads (geomean 0.85), 10.9 -> 9.8 s at 16 threads (0.87); 83 queries skip pages (q72 0.58x, q31 0.60x); results equal; peak memory geomean 0.83. Nothing to skip (#129717's layout, or unsorted facts): geomean 0.975 / 0.985 / 0.991, memory 0.99 to 1.005. CI perf: a new query in
join_runtime_filter.xml(locally 20 -> 13 ms, 999 of 1000 pages skipped).New test
05457_iceberg_join_runtime_filter_page_pruning, with a data file whose page index of the join key cannot be parsed: the read keeps every page and returns the same rows.Workflow [PR]
Sync PR [sync-upstream/pr/130906]
Version info
26.11.1.2159-master(included in26.11and later)