Skip to content

Revert "Revert "Parquet: dictionary-based row group filtering"" - #110567

Merged
alexey-milovidov merged 41 commits into
masterfrom
revert-110354-revert-106952-parquet-dictionary-filter-push-down
Jul 31, 2026
Merged

alexey-milovidov merged 41 commits into
masterfrom
revert-110354-revert-106952-parquet-dictionary-filter-push-down

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Reverts #110354

@clickhouse-gh

clickhouse-gh Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [21c7870]

Summary: ✅


AI Review

Summary

This PR re-enables Parquet v3 dictionary-based row-group filtering, adds the new input_format_parquet_dictionary_filter_push_down default, and folds in the earlier memory-budget and bloom-fallback fixes. The remaining blocker is that the new pre-decode budgeting path reads an unvalidated Thrift compression enum before the existing codec validation runs, so malformed files can hit enum undefined behavior in the pruning path instead of failing cleanly.

Documented surface
  • docs/en/interfaces/formats/Parquet/Parquet.md documents the new input_format_parquet_dictionary_filter_push_down setting, its default 1048576, and its precedence over bloom filters. I did not find conflicting docs/en or ClickHouse Cloud docs entries for this new setting.
Findings
  • ❌ [src/Processors/Formats/Impl/Parquet/Reader.cpp:1048-1052] The new pre-decode budget check branches on column.meta->meta_data.codec and passes it into Dictionary::decodedFootprintUpperBound before checkThriftEnum(column.meta->meta_data.codec, ...) runs in decodeDictionaryPageImpl. Thrift can deserialize out-of-range enum values here just like it can for PageHeader, and the file already documents that loading such enums directly is undefined behavior under -fsanitize=enum. A malformed Parquet file that reaches dictionary pruning can therefore trip enum UB in the filter path instead of failing cleanly with INCORRECT_DATA.
Final Verdict

Request changes.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 15, 2026
@mintlify

mintlify Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟢 Ready View Preview Jul 15, 2026, 3:12 PM

@mintlify

mintlify Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ClickHouse-docs 🟡 Building – Jul 15, 2026, 2:17 PM

…t-106952-parquet-dictionary-filter-push-down
… in the Parquet dictionary filter

`columnChunkCanUseDictionaryFilter` used `checkThriftEnum`, which throws `INCORRECT_DATA`,
to validate `page_type`/`encoding` in each `PageEncodingStats` entry. But `encoding_stats`
is only advisory metadata used to decide whether the dictionary-filter optimization is
safe to apply - the page stream itself may still be perfectly readable via a full scan
even if this metadata is garbage or carries a future/unrecognized enum value. Throwing
turned a readable file into a hard failure under the now-default-on dictionary filter.

Add a non-throwing `isValidThriftEnum` and use it here instead, so an unrecognized
`page_type`/`encoding` just makes the chunk ineligible for the optimization - the same
as a missing `encoding_stats` - matching every other soundness fallback in this function.

Add a regression test with pyarrow-crafted files carrying out-of-range `page_type`/
`encoding` values in `encoding_stats`, verifying the read still succeeds (falling back
to a full scan) instead of raising `INCORRECT_DATA`.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

Both AST fuzzer failures on head 51e6ec5 are pre-existing master bugs unrelated to this PR's diff, with fixes already in flight:

Neither fix has landed on master yet, so re-merging master cannot clear these reds.

A negative `PageEncodingStats.count` is corrupted metadata, but `encoding_stats` is
only advisory input to `columnChunkCanUseDictionaryFilter`, so it must not turn an
otherwise readable file into an `INCORRECT_DATA` exception under the default-on
dictionary filter: treat it like the unrecognized enum values and make the chunk
ineligible for the optimization instead, falling back to a full scan.

Add a regression test that crafts Parquet files with a negative `count` on both the
dictionary-page and the data-page `encoding_stats` entries and verifies they still
read correctly via a full scan.
…t-106952-parquet-dictionary-filter-push-down
…t-106952-parquet-dictionary-filter-push-down
Address the AI review finding on `Reader.cpp`: the dictionary-filter path
`hashDictionaryValues` bypassed the reader's memory budget. The eligibility
check `columnChunkCanUseDictionaryFilter` gates only on the *compressed*
on-disk dictionary page span (`dictionary_filter_limit_bytes`, 1 MiB by
default), which does not bound the decoded value set that pruning then builds
(a materialized column of all values, a vector of hashes, and a `HashSet` of
them). A highly compressible dictionary could stay under the compressed limit
yet decode to tens of MiB, with several row groups doing so in parallel during
pruning, none of it charged to `input_format_parquet_memory_high_watermark`.

Two changes in `hashDictionaryValues`:

- Cap on the decoded value set, not just the compressed page: estimate the
  memory the value-set construction needs and skip the optimization (falling
  back to a full scan, reported as "can't rule out a match", the same as an
  unhashable type) when it would exceed the reader's per-file memory high
  watermark. The watermark scales down automatically when the query has little
  memory to spare, so pruning is given up only when it would genuinely threaten
  the budget.

- Avoid the duplicate materialization: when the dictionary is already decoded
  into an `IColumn` (`Dictionary::Mode::Column`), hash that column directly
  instead of materializing an identical second copy via `Dictionary::index`.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
alexey-milovidov and others added 4 commits July 18, 2026 07:18
…oding

Address the AI-review blocker on the memory-budget guard added earlier: the
`memory_high_watermark` check in `hashDictionaryValues` runs only after the
dictionary page has already been decompressed and decoded during the
`BloomFilterBlocksOrDictionary` stage. `columnChunkCanUseDictionaryFilter` bounds
only the *compressed* on-disk dictionary page (`dictionary_filter_limit_bytes`,
1 MiB by default), so a highly compressible dictionary can stay under that limit
yet decode to tens of MiB. Because the pruning stage is not memory-throttled and
runs for many row groups in parallel, the default-on optimization could overshoot
`input_format_parquet_memory_high_watermark` before pruning even built its value
set.

Move the budget check ahead of the dictionary decode: `decodeDictionaryPage` now
takes a `max_decoded_bytes` cap and, on the pruning path, rejects a dictionary
whose decoded (uncompressed) page size would exceed the watermark before it is
decompressed. The column then falls back to a full scan (a missed optimization,
never a wrong result), and the dictionary is decoded later, throttled, on the
data-read path if the column is actually read. The complementary decoded-value-set
cap in `hashDictionaryValues` is unchanged.

Add `04611_parquet_v3_dictionary_filter_memory_budget` covering the low-memory
fallback: a file with a large decoded dictionary is pruned under a generous budget
and read in full (with identical, correct results) under a tight one.
…remaining allowance

The dictionary-filter pruning path (`BloomFilterBlocksOrDictionary` stage)
decoded the dictionary and built a value set without charging either to the
reader's per-stage memory accounting, and the earlier caps compared each
allocation against the full `input_format_parquet_memory_high_watermark`
rather than the memory still available. Several row groups pruning in parallel
could therefore each allocate just under the watermark and collectively
overshoot it.

Charge the decoded dictionary to the `BloomFilterBlocksOrDictionary` stage via
a `MemoryUsageToken` so it participates in the same per-reader budgeting
`scheduleTasksIfNeeded` enforces, and cap both the decoded dictionary page (in
`decodeDictionaryPage`) and the hashed value set (in `hashDictionaryValues`)
against the remaining pruning budget (`ReadManager::pruningMemoryBudget`)
instead of the full watermark. As each live dictionary shrinks the budget the
scheduler throttles how many row groups prune concurrently, bounding the total
pruning memory. The optimization stays fail-open: when the budget is exhausted
pruning is skipped and the row group is scanned in full.

Addresses the review feedback on #110567.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address review on `Reader.cpp`
(#110567): the dictionary-filter
pruning path could still exceed `input_format_parquet_memory_high_watermark` in
two ways.

1. `decodeDictionaryPage` gated only on the raw page payload
   (`max(uncompressed_page_size, compressed_page_size)`) before decoding, but
   `Dictionary::decode` allocates per-entry state on top of that - a
   `StringPlain` offsets array, or a fully decoded `col` for types that need
   conversion - so the true footprint (`Dictionary::allocatedBytes`) can be
   several times the page payload and a single decoded dictionary could overshoot
   the remaining budget before it was charged. The payload check is now a coarse
   pre-decode gate, and the exact decoded footprint is re-checked against the
   budget after decoding and before the dictionary is charged (in
   `ReadManager::runTask`) or used; if it does not fit, the dictionary is dropped
   and the caller falls back to a full scan.

2. `applyBloomAndDictionaryFilters` gave every `DictionaryLookup` the full
   budget, and each lookup's value set stays alive until the whole row-group
   filter evaluation finishes, so a predicate over several dictionary-filtered
   columns could build one full-budget value set per column and collectively
   overshoot. The budget is now a single counter shared by all lookups in the
   evaluation, decremented by each value set's persistent `HashSet` footprint as
   it is built, so their combined footprint stays within the watermark.
…umns

`04612_parquet_v3_dictionary_filter_multi_column_budget` reads a file with two
dictionary-encoded columns and a predicate over both, checking that pruning is
correct and effective under a generous `input_format_parquet_memory_high_watermark`
and stays correct (falling back to a full scan) as the budget shared across the two
columns' value sets tightens.
alexey-milovidov and others added 2 commits July 18, 2026 17:57
The dictionary-filter pruning path capped the decoded dictionary only
*after* `Dictionary::decode` had already materialized it: `decodeDictionaryPage`
decoded the page and only then compared `Dictionary::allocatedBytes` against the
budget, so a dictionary whose page bytes fit the budget but whose per-entry state
(a `StringPlain` offsets array, or a decoded `col`) did not could still overshoot
`input_format_parquet_memory_high_watermark` transiently before falling back to a
full scan. Likewise `hashDictionaryValues` estimated the value set from
`Dictionary::getAverageValueSize` alone, which understates the materialized
`ColumnString` (its `UInt64` offsets and its geometrically grown `chars` buffer),
so the estimate could pass while the actual materialization exceeded the budget.

Predict the full decoded footprint from the page header before decoding
(`Dictionary::decodedFootprintUpperBound`, mirroring the mode selection in
`Dictionary::decode`) and reject an oversized dictionary before `decode`
allocates anything, so the pruning path never overshoots the budget even
momentarily. Make the value-set estimate a proper upper bound that also counts
the materialized column's `UInt64` offsets and char-buffer growth, and skip the
materialization terms for the `Mode::Column` path that hashes the already-decoded
(already-charged) column in place. The post-decode `allocatedBytes` check is kept
only as a defensive backstop against the prediction drifting out of sync with
`decode`.

Addresses the AI review blockers on `Reader.cpp` (the pre-decode footprint and
the string value-set estimate) for
#110567.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
`04613_parquet_v3_dictionary_filter_short_string_budget` builds a dictionary of
many short strings, where the per-entry `UInt32` offsets and the materialized
`ColumnString` footprint dominate the raw page bytes - the case where accounting
only the page bytes understates the decoded footprint. It checks that pruning
still works under a generous budget and that results stay correct as the budget
tightens to a full-scan fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…pruning budget twice

On the dictionary-filter pruning path `Reader::decodeDictionaryPage` bounds the decoded
dictionary with `Dictionary::decodedFootprintUpperBound` and reserves it against
`input_format_parquet_memory_high_watermark` before decoding. It passed
`max(uncompressed_page_size, compressed_page_size)` as the page payload size, but the bytes
the decoded dictionary owns are the decompressed ones: `decodeDictionaryPageImpl` sizes
`decompressed_buf` at exactly `uncompressed_page_size` for a compressed chunk, and points
the dictionary straight at the first `compressed_page_size` prefetched bytes for an
`UNCOMPRESSED` one. The compressed frame lives in `dictionary_page_prefetch` and is already
charged to the pruning stage there, so taking the larger of the two double-counted it
whenever a codec expanded the page - which is legal, and our own writer does not fall back
to `UNCOMPRESSED` when compression grows the payload. The consequence was a missed
optimization: a row group whose decoded dictionary comfortably fits the budget fell back to
a full scan. This is the same class of double-counting that `04616` fixed for the
`UNCOMPRESSED` carrier, on the `compressed_page_size > uncompressed_page_size` side.

Pass the size of the payload `Dictionary::decode` will actually see instead, and rename the
parameter to `page_payload_size` to make the contract explicit.

New test `04651_parquet_v3_dictionary_filter_expanding_codec_budget`: a real codec only
expands an incompressible page by a fraction of a percent, too little to pin a watermark
between the two bounds, so the test crafts the file - the `ZSTD` dictionary page is padded
with bytes that belong to the page (`compressed_page_size` covers them and the reader does
prefetch them) but that the frame does not need, which pushes `compressed_page_size` far
past `uncompressed_page_size` while the file still reads back identically. With the
watermark pinned between the two bounds the fixed reader prunes the row group; the old
bound read all 120000 rows.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

25th round.

Addressed the AI Review "Request changes" verdict (Reader.cpp:998, the compressed carrier of the double-counting bug that 04616 fixed for the UNCOMPRESSED one) in 8ad0e7c.

Reader::decodeDictionaryPage was passing max(uncompressed_page_size, compressed_page_size) to Dictionary::decodedFootprintUpperBound. The bytes the decoded dictionary owns are the decompressed ones - decodeDictionaryPageImpl sizes decompressed_buf at exactly uncompressed_page_size for a compressed chunk, and points the dictionary straight at the first compressed_page_size prefetched bytes for an UNCOMPRESSED one - while the compressed frame lives in dictionary_page_prefetch and is already charged to the pruning stage there. Taking the larger of the two double-counted the frame whenever a codec expanded the page, which is legal and which our own writer does not avoid by falling back to UNCOMPRESSED. It now passes the size of the payload Dictionary::decode actually sees, and the parameter is renamed to page_payload_size so the contract is explicit.

Regression test 04651_parquet_v3_dictionary_filter_expanding_codec_budget. A real codec only expands an incompressible page by a fraction of a percent - too narrow a window to pin a watermark in - so the test crafts the file: the ZSTD dictionary page is padded with bytes that belong to the page (compressed_page_size covers them and the reader does prefetch them) but that the frame does not need, pushing compressed_page_size to ~16 MB against a ~1.2 MB decompressed payload while the file still reads back byte-identically. I measured both thresholds on this machine - ~115 MB with the fix, ~250 MB with the max(...) line restored and rebuilt - and pinned input_format_parquet_memory_high_watermark at 170 MB between them: fixed reader prunes (0 rows read), old bound read all 120000 rows. Generous and 1-byte budgets bracket it as in the sibling tests.

Also merged master (373 commits behind; clean, no conflicts) and pushed 8ad0e7c..d86491c. This pulls in #109023, which merged into master at 20:50Z today and closes #111421 - the Logical error: Inconsistent KeyCondition behavior (STID: 5182-2f27) that was the only red on the previous head. The other two reds from the 24th round are gone as well (the 03394_distributed_shuffle_join_with_aggregation plan diff is fixed separately in #112026).

Verification on the merge result: full ninja clickhouse, exit 0, 0 errors/warnings; all 19 dictionary-filter / bloom-filter tests pass byte-identically on the freshly built binary, 04616 included. The input_format_parquet_dictionary_filter_push_down entry in SettingsChangesHistory is still in the 26.8 block.

0 unresolved review threads. Waiting on fresh CI and a human merge.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

26th round — merged master (550 commits behind, CONFLICTING on GitHub) and pushed d86491c0cb6..33ee3798c26.

The merge itself was clean, with no conflict markers; the only overlapping file is src/Core/SettingsChangesHistory.cpp, and the input_format_parquet_dictionary_filter_push_down entry was re-checked and is still in the 26.8 block. ci/jobs/scripts/docs/check_autogenerated_regions.py reports no direct edits inside autogenerated regions (the settings row this pull request adds is in the hand-written docs/en/interfaces/formats/Parquet/Parquet.md).

Review state on the previous head d86491c0cb6: AI Review ✅ Approve, 0 unresolved review threads, no cursor[bot] or other review summaries.

CI on d86491c0cb6 had a single red, unrelated to this Parquet-only change: Integration tests (arm_binary, distributed plan, 2/4) — test_storage_s3_queue/test_system_stop.py::test_stopped_table_releases_hash_ring_slot and ::test_refresh_survives_unready_dependencies, both labelled retry_ok. The server aborts in DB::ObjectStorageQueueSource::FileIterator::next (libcxx verbose_abort, signal 6, arm_binary build, right after Failed to set files as processing in one request: Node exists) — the out-of-bounds access in the hash-ring path of FileIterator::next, which is fixed by #108977. That fix is still open, so merging master does not clear it.

Verification on the merge result: all 8 translation units this pull request touches compile with 0 errors and 0 warnings, and the full clickhouse binary links (build/build_pr110567_r26_final.log, build/r26_z2.log). All 16 dictionary-filter / bloom-filter tests pass byte-identically on the freshly linked binary: 04326, 04338, 04340, 04493, 04494, 04495, 04611–04617, 04623, 04646, 04651.

0 unresolved review threads. Waiting on fresh CI and a human merge.

…t-106952-parquet-dictionary-filter-push-down
@alexey-milovidov

Copy link
Copy Markdown
Member Author

Merged master (21c78700c50) — the branch was 1205 commits behind and both CI reds were master-wide breakages that are already fixed on master:

The merge was clean (no conflicts, no manual resolution); the 60-file PR diff is intact and the input_format_parquet_dictionary_filter_push_down entry is still in the 26.8 block of SettingsChangesHistory.cpp. check_autogenerated_regions.py reports no direct edits inside autogenerated regions. Master's only change under src/Processors/Formats/Impl/Parquet/ in this window is the per-condition prewhere split in Reader::preparePrewhere, which is disjoint from the dictionary filter.

Verification on the merge result: every translation unit compiles with 0 errors / 0 warnings and programs/clickhouse links; all 16 locally runnable dictionary/bloom tests pass byte-identical (02841, 03263, 04326, 04338, 04340, 04493, 04494, 04495, 04611–04617, 04623, 04646, 04651). The remaining touched tests (03036 ×2, 03261) need the stateless server harness for USER_FILES_PATH and were green in CI on the previous head.

AI Review is ✅ Approve and there are no unresolved review threads. Waiting on fresh CI and a human merge.

Comment on lines +1048 to +1052
size_t page_bytes = column.meta->meta_data.codec == parq::CompressionCodec::UNCOMPRESSED
? size_t(header.compressed_page_size)
: size_t(header.uncompressed_page_size);
reserved_bytes = Dictionary::decodedFootprintUpperBound(
column.meta->meta_data.codec, header.dictionary_page_header.encoding, column_info.decoder,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new pre-decode sizing path loads column.meta->meta_data.codec before checkThriftEnum(column.meta->meta_data.codec, ...) runs in decodeDictionaryPageImpl. Thrift can deserialize an out-of-range compression codec here just like it can for PageHeader, so on a malformed file that reaches dictionary pruning the comparison on this line and the decodedFootprintUpperBound(...) call below hit enum undefined behavior under -fsanitize=enum instead of failing cleanly with INCORRECT_DATA.

Please validate the codec before branching on it here, or thread the raw underlying integer through the sizing logic until it is checked.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clickgapai, after this PR is merged, address the comment above.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexey-milovidov I looked into #110567 but didn't land on a concrete change to make — the requested work looks like it may already be in the PR, or I couldn't pin down exactly what's still needed. If you have a specific case in mind (a query, a file, or the exact scenario to cover), point me to it and I'll follow up.

@clickhouse-gh

clickhouse-gh Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.40% 86.50% +0.10%
Functions 91.80% 91.90% +0.10%
Branches 78.50% 78.70% +0.20%

Changed lines: Changed C/C++ lines covered: 345/368 (93.75%) · Uncovered code

Full report · Diff report

@alexey-milovidov alexey-milovidov self-assigned this Jul 31, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 31, 2026
Merged via the queue into master with commit b3b9633 Jul 31, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the revert-110354-revert-106952-parquet-dictionary-filter-push-down branch July 31, 2026 16:57
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 31, 2026
pull Bot pushed a commit to Mu-L/ClickHouse that referenced this pull request Sep 20, 2026
…rquet

`input_format_parquet_dictionary_filter_push_down` (ClickHouse#106952, re-landed in
ClickHouse#110567) lets the `Parquet` reader skip a whole row group for an equality or
`IN` condition when the column chunk is fully dictionary-encoded and its
dictionary page holds none of the values that are searched for. Nothing in
`tests/performance` covered it.

The fixture puts the reader in the situation the feature was written for, the
one a real `hits.parquet` is in: a low-cardinality string column whose values
are spread over the whole file, so min/max statistics prune nothing (every row
group's range spans every value searched for), and no bloom filters, which is
what most Parquet writers produce. The dictionary page is then the only
per-row-group structure that can rule a value out.

Measured locally on the fixture the test builds, at `max_threads = 1`, with
`input_format_parquet_dictionary_filter_push_down` off and on:

    query                                            off       on   rows read
    count(), value in 30 of 300 row groups        0.401s   0.040s   300M -> 30M
    count(), value in no row group                0.393s   0.004s   300M -> 0
    count(), IN over both of them                 1.107s   0.118s   300M -> 30M
    sum() of another column, same condition       0.060s   0.013s
    count(), value in every row group             0.421s   0.426s   300M -> 300M

The last query is the counterweight: nothing can be skipped there, so the
dictionary pages are read and hashed for nothing and the query must not become
slower.

Co-Authored-By: Claude Opus 5 <[email protected]>
alexey-milovidov added a commit to valerypetrov/ClickHouse that referenced this pull request Oct 7, 2026
When a column chunk carries both a bloom filter and a dictionary page, the
reader read and decoded the dictionary page first and kept the bloom filter only
as a runtime fallback. The dictionary page is by far the larger of the two - up
to `input_format_parquet_dictionary_filter_push_down` bytes against one 32-byte
bloom filter block per queried value - so for every row group the bloom filter
alone could already rule out, the dictionary was read for nothing.

Reading `hits.parquet` written by ClickHouse (which writes bloom filters by
default) shows it: `SELECT UserID FROM file(...) WHERE UserID = <constant>` over
a file of 16 row groups reads 4,608 bytes with
`input_format_parquet_dictionary_filter_push_down = 0` and 8,017,209 bytes at the
default - the 16 `UserID` dictionary pages - to arrive at the same answer. That
is what made query no. 5 of the `clickbench_parquet_short` performance test
slower in both ClickHouse#106952 and ClickHouse#110567, on `arm` and on `amd`:
`DiskReadElapsedMicroseconds` +34..75%, `memory_usage` +17..22%,
`OSCPUVirtualTimeMicroseconds` +9..10%.

The bloom filter is now evaluated in its own stage, before the dictionary pages
are fetched. It has no false negatives, so a row group it rules out is ruled out
for good and no dictionary page is read. A row group it does not rule out goes on
to the dictionary stage exactly as before, and the dictionary costs nothing extra
there: either the row group is read anyway - which needs the dictionary page to
decode it - or the dictionary rules it out exactly, which is the bloom filter's
false positive. Pruning power is therefore unchanged, and files without bloom
filters, which is what the feature was written for, take the same path as before.

After the change the same query reads 4,608 bytes at the default setting, the
same as with the filter turned off.

`BloomFilterHeader` and `BloomFilterBlocks` share one stage's worth of the
per-stage memory budget, so `Dictionary`, the index stages and `ColumnData` keep
exactly the share they had when the bloom filter and the dictionary were one
stage - `input_format_parquet_memory_high_watermark` means the same thing for the
dictionary-pruning path as before.

Co-Authored-By: Claude Opus 5 <[email protected]>

This branch was successfully deployed

1 active deployment
staging - docs — 21c78700 Deployed Jul 30, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants