Skip to content

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

Merged
Algunenano merged 1 commit into
masterfrom
revert-106952-parquet-dictionary-filter-push-down
Jul 14, 2026
Merged

Algunenano merged 1 commit into
masterfrom
revert-106952-parquet-dictionary-filter-push-down

Conversation

@Algunenano

@Algunenano Algunenano commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Reverts #106952

Broke private CI

Version info

  • Merged into: 26.7.1.900 (included in 26.7 and later)

@clickhouse-gh

clickhouse-gh Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [39f6d36]


AI Review

Summary

This PR reverts the Parquet v3 dictionary-based row-group filter that was introduced in #106952, removing the setting, the reader/writer support, and the dedicated tests. I found two issues in the revert as written: it breaks upgrades from 26.7 by deleting a released setting outright, and it also reintroduces a separate bloom-filter eligibility regression for Parquet files whose row groups do not all carry bloom filters uniformly.

Findings

❌ Blockers

  • [src/Core/FormatFactorySettings.h:203] Removing input_format_parquet_dictionary_filter_push_down from the settings registry is a backwards-incompatible upgrade break. The setting already shipped in 26.7, so existing profiles and query-level SETTINGS clauses that still mention it will start failing with UNKNOWN_SETTING instead of simply losing the optimization.
    Suggested fix: keep the setting registered as a deprecated no-op (for example defaulting to 0 and ignoring it in FormatFactory) so upgrades from 26.7 remain safe.

⚠️ Majors

  • [src/Processors/Formats/Impl/Parquet/Reader.cpp:477] prepareBloomFilterCondition now decides bloom-filter eligibility from row_groups[0] only. bloom_filter_offset is defined per column chunk, not per file, so a mixed file where the first surviving row group lacks a bloom filter but a later one has it will silently lose pruning for the later row groups.
    Suggested fix: keep scanning all surviving row groups for any bloom_filter_offset when deciding whether to hash query constants for bloom filtering, even if the dictionary-filter logic is removed.
Final Verdict

Not ready as-is. The revert needs at least a compatibility shim for the released setting, and it should not bring back the mixed-row-group bloom-filter regression while removing dictionary filtering.

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

mintlify Bot commented Jul 14, 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 14, 2026, 9:56 AM

DECLARE(Bool, input_format_parquet_bloom_filter_push_down, true, R"(
When reading Parquet files, skip whole row groups based on the WHERE expressions and bloom filter in the Parquet metadata.
)", 0) \
DECLARE(UInt64, input_format_parquet_dictionary_filter_push_down, 1024 * 1024, R"(

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 setting already shipped in 26.7 (#106952 was marked "included in 26.7 and later"), so deleting the registration outright turns a previously valid profile or SETTINGS clause into UNKNOWN_SETTING on upgrade. That is a compatibility break rather than just disabling the optimization.

If the reader-side feature has to be reverted, we still need to keep input_format_parquet_dictionary_filter_push_down accepted as a deprecated no-op (for example defaulting to 0 and being ignored) so existing configs continue to parse.

if (!any_row_group_eligible)
/// Check for presence of bloom filter only in first row group, expecting that usually
/// either all or none of the row groups have bloom filter for any given column.
const parq::ColumnChunk * column_chunk_meta = row_groups[0].columns[primitive_idx].meta;

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 also reintroduces the "first surviving row group is representative" assumption for bloom-filter availability. bloom_filter_offset is a per-column-chunk property, so a file can legitimately have no bloom filter in row_groups[0] and still have one in a later row group. In that case prepareBloomFilterCondition never hashes the query constants, use_bloom_filter stays false everywhere, and the later row groups silently lose pruning.

Can we keep the all-row-group scan for bloom_filter_offset even while removing dictionary filtering? That would preserve the revert's scope without bringing back a mixed-row-group regression for external Parquet files.

@Algunenano
Algunenano enabled auto-merge July 14, 2026 10:20
@Algunenano
Algunenano added this pull request to the merge queue Jul 14, 2026
Merged via the queue into master with commit ba77fa8 Jul 14, 2026
18 of 31 checks passed
@Algunenano
Algunenano deleted the revert-106952-parquet-dictionary-filter-push-down branch July 14, 2026 11:42
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 14, 2026
alexey-milovidov added a commit to wudidapaopao/ClickHouse that referenced this pull request Jul 15, 2026
The merge of master at 085ac5e kept the `SettingsChangesHistory` entry
for `input_format_parquet_dictionary_filter_push_down` although the setting
itself was removed from master by the revert
ClickHouse#110354. Applying any
`compatibility` value then failed with `UNKNOWN_SETTING`, which broke 19
compatibility-related tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=99736&sha=00f4c1cfd2feae6038d62945eafb469ea8dc1483&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
The merge of master at dcdabc1 kept the branch side of
src/Core/SettingsChangesHistory.cpp wholesale, retaining the history entry
for `input_format_parquet_dictionary_filter_push_down` although master had
removed both the entry and the setting itself when #106952 was reverted
by #110354. The orphan entry made `Settings::applyCompatibilitySetting`
throw `UNKNOWN_SETTING` for any query with a non-empty `compatibility`
setting, failing all 19 compatibility-family tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108944&sha=dcdabc13df899dbef3fdb4c5cccbbd9fadaf1803&name_0=PR&name_1=Fast%20test

Verified locally: `clickhouse local --compatibility=24.6` no longer throws,
`compatibility='26.6'` correctly rolls `mysql_datatypes_support_level` back
to `decimal,datetime64,date2Date32`, and `02325_compatibility_setting_2`
passes against its reference.

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
…nary_filter_push_down`

The setting was added by #106952 (merged into this branch on 07-13) and
reverted on master by #110354, but the merge kept the history entry
because it is adjacent to this PR's own `snappy_mode` entry. The orphan
entry made every query with a `compatibility` setting fail with
`UNKNOWN_SETTING`, which is what broke the Fast test on
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100752&sha=bee84f139ca122148eaa99904c0a6dca3733cbd3&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
…ory entry

The setting was introduced on master by #106952 and was picked up by the
2026-07-14 morning merge of master into this branch. Master then reverted
#106952 in #110354, and the subsequent merge of master into this branch
removed the setting declaration but left the `SettingsChangesHistory.cpp`
entry behind, orphaning it: applying any `compatibility` value older than
26.7 threw `UNKNOWN_SETTING`, which broke all 19 compatibility-related
tests in Fast test.

Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=97254&sha=53cf0bf945b6661cccd0398f696f2882d42cf695&name_0=PR&name_1=Fast%20test
PR: #97254
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
… from settings changes history

The setting was added by #106952 and reverted on master by #110354
("Broke private CI"), but the last merge of master into this branch kept
its `SettingsChangesHistory.cpp` entry, because the removal landed on
master concurrently and the merge resolved the adjacent region in favor
of keeping the line. Since the setting no longer exists, applying any
`compatibility` value below 26.7 threw `UNKNOWN_SETTING`, which failed
19 Fast test cases and cancelled the rest of the CI run:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106215&sha=73c5d060466431c91b10b914d0ae6001760fa8ab&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
…rquet_dictionary_filter_push_down`

The setting was added by #106952 and reverted on master by #110354, which
deleted both the setting and its `SettingsChangesHistory.cpp` entry. Because
this PR adds its own two entries (`network_compression_method`,
`network_zstd_compression_level`) immediately above that line, the
2026-07-14 merge of master kept the branch-side block and resurrected the
deleted entry. A history entry referencing a nonexistent setting makes every
`SET compatibility = ...` throw `UNKNOWN_SETTING`, which failed 19
compatibility-related tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108786&sha=e07f5bdc1a0969d07670a9ebb0d560cda6b6daab&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
…y from settings history

The setting was added by #106952 and reverted on master by #110354, which
removed both the setting declaration and its history entry. The merge of
master into this branch kept the stale history line (it sits adjacent to
this PR's own `ignore_on_cluster_for_replicated_handler_queries` entry, so
the hunk auto-merged without a conflict). The orphan made every
`SET compatibility` older than 26.5 throw `UNKNOWN_SETTING`, failing 19
compatibility tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106231&sha=22033553d4f041305264ea4248e4fd24fcdc9ee8&name_0=PR&name_1=Fast%20test
alexey-milovidov added a commit that referenced this pull request Jul 15, 2026
…ting

The `input_format_parquet_dictionary_filter_push_down` setting arrived on
this branch via a master merge (added by #106952), but master then reverted
that PR in #110354. The next master merge into this branch resolved cleanly
in text, yet silently kept the deleted history line in
`SettingsChangesHistory.cpp`, because this branch inserts its own new-settings
entries directly above it in the same `26.7` block. The setting declaration
itself was removed, so every `SET compatibility = ...` threw
`UNKNOWN_SETTING: Unknown setting 'input_format_parquet_dictionary_filter_push_down'`
from `applyCompatibilitySetting`, failing 19 tests in `Fast test`:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105249&sha=ff346faaaa81ae9d7072fc1714a5396d3870b73f&name_0=PR&name_1=Fast%20test

All 19 tests pass locally after removing the entry.

Co-Authored-By: Claude Fable 5 <[email protected]>
alexey-milovidov added a commit that referenced this pull request Jul 16, 2026
…ory entry

The 2026-07-15 merge of master kept the settings-changes-history entry for
`input_format_parquet_dictionary_filter_push_down` although the setting
itself was removed on master by the revert of #106952 (#110354): the entry
was adjacent to this branch's own `query_cache_use_only_when_data_was_not_changed`
line, so the three-way merge kept both sides without a textual conflict.

An orphan history entry makes `SettingsImpl::applyCompatibilitySetting` throw
`UNKNOWN_SETTING` for any `SET compatibility` older than 26.7, which failed
19 compatibility tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108721&sha=bddca1b12a2ec30a986afcfc73d0cbb53f51780c&name_0=PR&name_1=Fast%20test
#108721
alexey-milovidov added a commit that referenced this pull request Jul 16, 2026
…onary-filter setting

A prior master merge picked up `input_format_parquet_dictionary_filter_push_down`
from #106952 while it was briefly on master; #110354 reverted that feature on
master, but because the net diff for that region looked unchanged relative to
older merge-bases, later merges kept the orphaned history entry with no
corresponding `DECLARE` anywhere in `src/`. Any `compatibility` setting older
than 26.7 then threw `UNKNOWN_SETTING` walking the history, failing every
compatibility-related Fast test (`02324_compatibility_setting`,
`03916_check_settings_constraints_erases_with_compatibility`, etc).
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…rquet-dictionary-filter-push-down

Revert "Parquet: dictionary-based row group filtering"
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…nary_filter_push_down`

The setting was added by ClickHouse#106952 (merged into this branch on 07-13) and
reverted on master by ClickHouse#110354, but the merge kept the history entry
because it is adjacent to this PR's own `snappy_mode` entry. The orphan
entry made every query with a `compatibility` setting fail with
`UNKNOWN_SETTING`, which is what broke the Fast test on
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100752&sha=bee84f139ca122148eaa99904c0a6dca3733cbd3&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Fable 5 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The merge of master at dcdabc1 kept the branch side of
src/Core/SettingsChangesHistory.cpp wholesale, retaining the history entry
for `input_format_parquet_dictionary_filter_push_down` although master had
removed both the entry and the setting itself when ClickHouse#106952 was reverted
by ClickHouse#110354. The orphan entry made `Settings::applyCompatibilitySetting`
throw `UNKNOWN_SETTING` for any query with a non-empty `compatibility`
setting, failing all 19 compatibility-family tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108944&sha=dcdabc13df899dbef3fdb4c5cccbbd9fadaf1803&name_0=PR&name_1=Fast%20test

Verified locally: `clickhouse local --compatibility=24.6` no longer throws,
`compatibility='26.6'` correctly rolls `mysql_datatypes_support_level` back
to `decimal,datetime64,date2Date32`, and `02325_compatibility_setting_2`
passes against its reference.

Co-Authored-By: Claude Fable 5 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The merge of master at 085ac5e kept the `SettingsChangesHistory` entry
for `input_format_parquet_dictionary_filter_push_down` although the setting
itself was removed from master by the revert
ClickHouse#110354. Applying any
`compatibility` value then failed with `UNKNOWN_SETTING`, which broke 19
compatibility-related tests in Fast test:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=99736&sha=00f4c1cfd2feae6038d62945eafb469ea8dc1483&name_0=PR&name_1=Fast%20test

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

This branch was successfully deployed

1 active deployment
staging - docs — 39f6d365 Deployed Jul 14, 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.

2 participants