Skip to content

Do not build bloom_filter index atoms for negated functions - #116544

Merged
nihalzp merged 3 commits into
ClickHouse:masterfrom
groeneai:bloom-filter-no-negated-atoms
Sep 8, 2026
Merged

nihalzp merged 3 commits into
ClickHouse:masterfrom
groeneai:bloom-filter-no-negated-atoms

Conversation

@groeneai

@groeneai groeneai commented Aug 26, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Performance Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

A bloom_filter skip index is no longer selected for a condition built only from != or NOT IN. A bloom filter can only prove that a value is absent from a granule, so such a condition never skipped a granule while the whole index was still read. force_data_skipping_indices now reports INDEX_NOT_USED for it.

Description

Related: #116470

A bloom_filter index whose condition is only negated atoms was put into the useful index set and read in full, then skipped zero granules.

Measured on the reporter's own fixture (2M rows, one bloom_filter(0.01) index), WHERE v != <absent>:

SelectedMarks read_rows ReadCompressedBytes
before 245 2000000 2530271
after 245 2000000 19036

The 2511235 byte saving is the compressed size of the index to the byte, and no pruning is lost because the condition provably could not drop a granule. Read amplification only, never wrong results.

Cause: every atom pushes BoolMask(match_rows, true), which was then negated for the two negated atom kinds. Since !BoolMask is {can_be_false, can_be_true}, can_be_true became unconditionally true, so the granule check could never return false. notEquals, notIn and globalNotIn are now declined at condition construction, so the atoms have no producer and are removed. This is the shape the supported text index already has after d12905698ae. The in-source documentation matrix is flipped to match.

Siblings checked. A negated atom beside a positive one still prunes (v = 3 AND v != 100 is an arm of the new test). equals, IN, has and indexOf are unaffected, as are cross-index disjunctions. No data type is inspected, so type wrappers are structurally irrelevant. minmax keeps its negated atoms, correctly, because a range answers a negated condition exactly.

Three residuals I am not changing: NOT has(column, needle) has the same symptom and stays as 04903_not_has_secondary_index pins it; tokenbf_v1/ngrambf_v1 carry the identical atoms but are deprecated, per @ PedroTadim's scope ruling on the issue; and sparse_grams, which is not deprecated, shares their condition implementation, so declining the atoms there cannot be scoped to it alone.


Workflow [PR]
Sync PR [sync-upstream/pr/116544]

groeneai and others added 2 commits August 26, 2026 12:49
A bloom_filter skip index whose condition consists only of negated atoms
(v != c, v NOT IN (...)) was put into the useful index set and read in
full, and then skipped zero granules, so the whole index read was pure
overhead.

Measured on the reporter's fixture (2000000 rows, one bloom_filter(0.01)
index), WHERE v != <absent> read 2530271 compressed bytes with the index
and 19036 with ignore_data_skipping_indices, at identical SelectedMarks
and read_rows. The 2511235 byte difference is the compressed size of the
index to the byte.

Cause: mayBeTrueOnGranule pushes BoolMask(match_rows, true) for every
atom and then negated it for FUNCTION_NOT_EQUALS and FUNCTION_NOT_IN.
BoolMask::operator! is {can_be_false, can_be_true}, so a negated atom
evaluated to can_be_true = true unconditionally and the function, which
returns rpn_stack[0].can_be_true, could never return false. That is
mathematically unavoidable: a bloom filter proves a value is absent from
a granule, never that every row of the granule equals it. The index
nevertheless still built those atoms and alwaysUnknownOrTrue counted
them as useful, so the index was selected and read.

notEquals, notIn and globalNotIn are now declined at condition
construction, so RPNBuilder emits FUNCTION_UNKNOWN, the condition is
always-unknown-or-true and the index is not selected. The two atom kinds
then have no producer and are removed. This is the shape the supported
text index already has after d129056,
which removed the same two atoms from MergeTreeIndexConditionText.

No pruning is lost, because the condition provably could not drop a
granule. A negated atom beside a positive one still prunes. The only
user-visible change is that force_data_skipping_indices now reports
INDEX_NOT_USED for a purely negated condition, which is already how the
text index behaves.

tokenbf_v1 and ngrambf_v1 carry the identical atoms and are left
untouched because they are deprecated, per the scope ruling on the
issue. NOT has(column, needle) has the same symptom and is also left
alone; 04903_not_has_secondary_index pins that behaviour.

Nine query lines in 02021_map_bloom_filter_index and
03990_map_subcolumn_skip_index asserted the old behaviour and now expect
INDEX_NOT_USED, each followed by the same query without the setting so
their row-level assertions are preserved.

Closes: ClickHouse#116470

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

The in-source Functions support matrix in registerStorageMergeTree.cpp, the
source of truth for the generated MergeTree documentation, now marks the
bloom_filter column of the notEquals and notIn rows with a cross, which is what
the note below that same table already said in prose by listing s != 1 under
"Can not be optimized". The generated mergetree.mdx mirror sits inside an
AUTOGENERATED region and is refreshed by the nightly docs generator, not here.

Three contracts were argued from the source but never executed, so they get
arms in 05055:

- A negated atom inside a cross-index disjunction. Only the index whose atoms
  are all negated leaves the useful set, the other index still enters it from
  the same disjunction, and the results are unchanged. This arm reddens on the
  parent commit, where the negated atom reported can_be_true and the OR
  therefore kept the index.
- A positive disjunction still prunes by combining both indexes, 8 of 16
  granules. It pins use_skip_indexes_for_disjunctions and
  use_skip_indexes_on_data_read at query level because clickhouse-test
  randomizes both, and it reports 16 with combining off.
- A doubly negated condition, which the documentation promises can be
  optimized. That promise now rests on the inversion pushdown folding
  not(notEquals()) back to equals, so this is a preservation arm and passes on
  the parent commit too. A throwaway canFoldToInverseRelation mutant that
  declines the fold for notEquals, notIn and globalNotIn turns both lines into
  INDEX_NOT_USED, which is what proves they pin the fold.

The third sentence of the comment at the notIn decline is dropped: it described
where the check sits, not the property that makes the check correct.

Co-Authored-By: Claude Opus 5 <[email protected]>
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-request PR origin: a maintainer pinged or directed groeneai labels Aug 26, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex, two passes, 4 findings) plus my own
cold review of the resulting code (5 further findings), over one full round and one fix round with a
delta recheck.

# Sev Finding Verdict Evidence / action
1 ⚠️ The in-source index support matrix still marks bloom_filter as supporting notEquals and notIn (registerStorageMergeTree.cpp:1775, :1785) AGREE, fixed @ 86fa6d7 Both cells flipped to a cross, matching the text column and the :::note below the table, which already lists s != 1 under "Can not be optimized". The generated .mdx is left alone: it is inside an AUTOGENERATED region refreshed by the nightly generator.
2 ⚠️ No test arm puts a negated atom inside a cross-index disjunction, so the partial-disjunction contract is argued and never executed AGREE, fixed @ 86fa6d7 Added v != 100 OR w = 5 arms: forced on the negated column the index is now correctly rejected (and that arm reddens on the pre-fix build), forced on the positive column it is still used, and the count matches use_skip_indexes = 0. use_skip_indexes_for_disjunctions is deliberately not pinned: index selection is gated only on alwaysUnknownOrTrue (ReadFromMergeTree.cpp:2864), the setting only controls combining (:2901), and all four lines were measured identical at 0 and at 1.
3 ⚠️ The documented NOT s != 1 shape, which stays optimizable only because inversion pushdown folds it back to equals, had no arm AGREE, fixed @ 86fa6d7 Added forced arms for NOT (v != 100) and NOT (v NOT IN (100, 101)). They pass on both builds by design; their liveness was shown with a throwaway mutant making canFoldToInverseRelation refuse the fold, which turns both red while 04903_not_has_secondary_index stays green.
4 ⚠️ sparse_grams is not deprecated, yet keeps the identical useless atoms DISAGREE (on the remedy) The fact is right and now disclosed in the description. The remedy is not available here: sparse_grams, tokenbf_v1 and ngrambf_v1 share one condition implementation (MergeTreeIndices.cpp:595 registers all three through bloomFilterIndexTextCreator), so declining the atoms for sparse_grams necessarily changes the two deprecated types in the same commit, which is outside the scope set on the issue, and it would break the tokenbf_v1/ngrambf_v1 arms of 02000_map_full_text_bloom_filter_index. That call belongs to a maintainer.
5 💡 The new source comment carried a third sentence explaining why the check sits where it does AGREE, fixed @ 86fa6d7 Trimmed to the two lines that state the invariant; the placement rationale is in the commit message.
6 💡 The description spelled the index type minMax, and linked the issue with the #116470 shorthand where the repository asks for a full URL (AGENTS.md:176) AGREE, fixed Both corrected in the description before publication.
7 💡 MergeTreeIndexBloomFilter.cpp:583 still explains that NOT IN is unsupported "after BoolMask inversion", which this change removes from the file AGREE, noted, not fixed The statement stays true and the guard below it is still needed for the null-aware IN variants, so there is no behavioural consequence; it is pre-existing text outside this diff and I did not widen the diff for it.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding. Findings on hunks unchanged by the fix round are auto-dropped.

Also checked and clean: the affected-test set was enumerated independently and reproduces exactly
(of the 111 stateless tests using TYPE bloom_filter, 13 mention a negated form and only 02021
and 03990 are affected; both keep every row-level assertion through an unforced twin query), the
enum removal leaves the granule switch exhaustive with no default:, and
notNullIn/globalNotNullIn were already unhandled and are untouched.

Session id: cron:clickhouse-review-slot-10:20260826-144000

@clickhouse-gh clickhouse-gh Bot closed this Aug 26, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Aug 26, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. EXPLAIN indexes = 1 SELECT count() FROM bf WHERE v != 99999999999 reports Granules: 245/245 and the same query under force_data_skipping_indices='idx_v' succeeds, on demand, every run. Discriminating negative control: a predicate with no atom on v raises INDEX_NOT_USED.
b Root cause explained? Every atom pushes BoolMask(match_rows, true), then the two negated atom kinds were negated. !BoolMask is {can_be_false, can_be_true}, so can_be_true became unconditionally true and the granule check could never return false, yet alwaysUnknownOrTrue still counted those atoms as useful, so the whole index was read.
c Fix matches root cause? Yes. notEquals, notIn and globalNotIn are declined at condition construction, so the atoms the index cannot decide have no producer and are removed. Source-level, not a guard at the selection site. Same shape as d12905698ae for the text index.
d Test intent preserved / new tests added? Yes. Nothing removed or weakened: each of the 9 updated arms keeps its row-level assertion via an unforced twin query, so 02021's reference is unchanged. A new test 05055_bloom_filter_index_no_negated_functions is added with 21 assertions in 10 labelled groups, covering the negated forms, a negated atom beside a positive one, a negated atom inside a cross-index disjunction, combined disjunction pruning, and the doubly negated forms.
e Both directions demonstrated? Yes. ReadCompressedBytes for v != <absent> falls 2530271 to 19036 with SelectedMarks and read_rows unchanged. On the base binary the new test fails naming exactly three lines, the two negated arms plus v != 100 OR w = 5 forced on idx_v, while every other group is byte-identical on both builds. The two doubly negated lines pass on both builds by design, so their liveness is shown separately: a throwaway canFoldToInverseRelation mutant declining the fold turns both into INDEX_NOT_USED while 04903_not_has_secondary_index stays green, proving the mutant narrow and the arms load-bearing.
f Fix is general across code paths? Yes. Both notEquals spellings including reversed constant != column, both traverseTreeIn producers (ordinary column and map), both traverseTreeEquals producers, the tuple recursions, and the globalNotIn alias. The granule switch has no default:, so the compiler enumerated the sites; build is clean. notNullIn/globalNotNullIn were already unhandled and are untouched.
g Fix generalizes across inputs (params/datatypes/wrappers)? Structurally yes: the change keys on SQL function names and RPN atom kinds and never inspects a data type, so Nullable, LowCardinality, Array, Map, Const, Tuple and JSON subcolumns cannot diverge. Map carriers are covered empirically by the 9 updated arms.
h Backward compatible? (maintainer-approved exception only) Yes. No setting, no default, no serialization or on-disk format change, so no SettingsChangesHistory.cpp row applies. The index is still written by the untouched aggregator, so existing parts stay readable. The one visible change is force_data_skipping_indices reporting INDEX_NOT_USED for a purely negated condition, which is already how the text index behaves.
i Invariants and contracts preserved? Yes. traverseFunction keeps its contract of returning false when it cannot build an atom, and the caller then emits FUNCTION_UNKNOWN. The removed can_be_false could only reach the root through a FUNCTION_NOT, which cannot sit above these atoms because every caller canonicalizes through ActionsDAGWithInversionPushDown and the inverse-relation fold rewrites all three functions to their positive forms; that fold is no longer only argued, it is pinned by two arms whose liveness a canFoldToInverseRelation mutant demonstrates. The partial-disjunction bitset is initialised to true, so an atom that wrote true and one that writes nothing are indistinguishable, which is now measured: the four disjunction lines return identical results with use_skip_indexes_for_disjunctions at 0 and at 1. No locking, allocation or error path is touched.

Session id: cron:clickhouse-impl-slot-41:20260826-134200

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @rschu1ze @alesapin, could you review this? A bloom_filter condition built only from != or NOT IN still pushed atoms whose BoolMask negation left can_be_true unconditionally true, so alwaysUnknownOrTrue counted them as useful and the whole index was read while never dropping a granule. Declining notEquals, notIn and globalNotIn at condition construction removes those atoms, which is the shape the text index already has after d12905698ae.

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai the solution is to remove the index support for the negated functions? Are you sure it cant' be applied?

@groeneai

Copy link
Copy Markdown
Collaborator Author

Yes, that is the change, and yes, I am sure. What it removes is two atoms that could never decide a granule, not any pruning.

A bloom filter answers set membership. To drop a granule for v != c I would have to prove that every row in it equals c, and membership cannot express that: a granule holding c almost always holds other values too. The code said the same. Every atom pushed BoolMask(match_rows, true) and the two negated kinds were then inverted, and since BoolMask::operator! is {can_be_false, can_be_true} (BoolMask.h:16) can_be_true came out unconditionally true, while mayBeTrueOnGranule returns exactly rpn_stack[0].can_be_true. It could not return false for any granule on any data.

Measured before the change, 2M rows, bloom_filter(0.01) GRANULARITY 1: EXPLAIN indexes = 1 reports Granules: 245/245 for v != <absent> and for v NOT IN (<absent>), against 0/245 for v = <absent> on the same index and data. Selecting the index versus ignore_data_skipping_indices leaves SelectedMarks at 245 and read_rows at 2000000 either way and moves only ReadCompressedBytes, 2530271 against 19036. The 2511235 B difference is the compressed size of idx_v to the byte.

Nothing prunable is lost. A negated atom beside a positive one still prunes, v = 5 AND v != 99999999999 giving Granules: 4/245 on that same table, because the decline belongs to the whole condition and not to the atom in isolation. In a cross-index disjunction the other index is still used, which the new test forces on idx_w for v != 100 OR w = 5.

The shipped documentation already said this before the PR: the :::note under the same in-source table lists s != 1 under "Can not be optimized" for bloom_filter, while the matrix cell above it claimed support. The PR flips those two cells, so table, note and code agree. minmax keeps both functions, correctly, because a range does answer != exactly. The supported text index took the same route in d12905698ae by @ CurtizJ, "remove support of functions with negation from text index", +4/-38.

The source change is +12/-22 over three files, of which registerStorageMergeTree.cpp is the two matrix cells at one character each; everything else in the diff is tests.

One sibling call is yours: sparse_grams is not deprecated, but it shares MergeTreeConditionBloomFilterText with tokenbf_v1 and ngrambf_v1, all three registered through bloomFilterIndexTextCreator, so declining the atoms there would change the two deprecated types in the same commit. I left it untouched under your scope ruling.

@clickhouse-gh

clickhouse-gh Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [f5cc4ce]

Summary: ✅


AI Review

Summary

This PR removes useless bloom_filter skip-index atoms for != and NOT IN, updates the support matrix, and adds focused regression coverage for the affected scalar, map, and disjunction paths. The current head looks correct on the touched bloom_filter logic, but there is one metadata nit: the PR still says it closes #116470 even though that issue also covers tokenbf_v1 and ngrambf_v1, which are intentionally left unchanged here.

Findings

💡 Nits

  • [src/Storages/MergeTree/registerStorageMergeTree.cpp:1795] The implementation scope in this PR is only bloom_filter, but the PR body still uses Closes: https://github.com/ClickHouse/ClickHouse/issues/116470. That issue also tracks the same negated-predicate overhead for tokenbf_v1 and ngrambf_v1, so merging this PR would auto-close unresolved work. Suggested fix: change that relation to Related: or split the remaining text bloom-filter work into a follow-up issue before keeping Closes:.
Final Verdict

One metadata fix is still needed before merge: do not auto-close #116470 from a PR that intentionally leaves the tokenbf_v1 / ngrambf_v1 half of the issue open. I did not find a code-level blocker in the current bloom_filter changes.

LLVM Coverage Report

Measured on commit f5cc4ce.

Metric Baseline Current Δ
Lines 88.80% 88.80% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 81.20% 81.20% +0.00%

Changed lines: Changed C/C++ lines covered: 60/61 (98.36%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Aug 27, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing f5cc4ce16 with master 55c256363 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

9 translation units recompiled, 31 s compile time in total, 9 of them have a recent master baseline.

Job report

@clickhouse-gh

clickhouse-gh Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 39 queries analysed

This PR only changes how the MergeTree bloom_filter skip index handles negated predicates (!= and NOT IN), making such conditions no longer select the index, plus docs and tests. None of the three flagged ClickBench queries use a bloom_filter skip index or a negated predicate: Q28, Q33, and Q34 are full-scan GROUP BY aggregations, so the changed code path is never exercised. The 6-7% deltas are consistent-looking but off-path (Q28 is intrinsically noisy and Q34 sits on a pre-existing master trend), so all three are downgraded to not_sure as run-to-run variance rather than PR effects. No cross-query pattern ties these to the diff.

clickbench

⚠️ 3 inconclusive

Flagged queries (3 of 43)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 28 not_sure 1050 1111 +5.8% 0.0001 Q28 is a GROUP BY/HAVING scan with no bloom_filter index or != / NOT IN predicate, so this PR's skip-index change cannot touch it; the query is also intrinsically noisy, so treat the +5.8% as variance.
⚠️ 33 not_sure 1139 1210 +6.2% <0.0001 Q33 groups by SearchEngineID/ClientIP over a full scan and uses no bloom_filter skip index or negated predicate. The PR only changes bloom_filter != / NOT IN handling, so the +6.2% is not attributable to this diff.
⚠️ 34 not_sure 1141 1220 +6.9% <0.0001 Q34 groups by WatchID/ClientIP over a full scan with no bloom_filter index or negated predicate involved. This bloom_filter-only change cannot touch its hot path; the +6.9% sits on an existing master trend, so treat it as variance.

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
  • StressHouse run: 7478c49d-0761-4279-94de-7bfd3b0ec620
  • MIRAI run: cae969d8-23d4-4aac-aeef-d75f412e8c46
  • PR check IDs:
    • clickbench_1626917_1788855445
    • clickbench_1626923_1788855445
    • clickbench_1626929_1788855445
    • tpch_adapted_1_official_1626940_1788855445
    • tpch_adapted_1_official_1626956_1788855445
    • tpch_adapted_1_official_1626988_1788855445

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 86fa6d7

Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Stress test (amd_debug) / Logical error: Inconsistent AST formatting (STID 1941-26fa) trunk bug: CREATE TABLE ... AS remote(...) PRIMARY KEY tuple(data) formats back as data Array(String) PRIMARY KEY, and the hoisted key no longer parses. This is exactly the table-function PRIMARY KEY tuple() shape fixed on master; this run predates that merge #116645 (ours, merged 2026-08-28 01:10Z)
Stress test (amd_tsan) / Logical error: Equal values are not contiguous within the range assumed to be sorted (STID 2508-3319) trunk bug of the #115455 family: checkEqualRangeEndAssumeSorted over ColumnVector<Int256> after an order-breaking cast #113242 (ours, open, Closes #115455)
Stress test (arm_tsan) / same logical error (STID 2508-348f) same family over ColumnVector<char8_t>; that arm is already A/B verified against the fix #113242 (ours, open)

Not PR-caused: this PR touches MergeTreeIndexBloomFilter, registerStorageMergeTree and three
stateless tests. Neither aborting query uses a bloom_filter index, and neither abort is on a
skip-index code path.

Session id: cron:our-pr-ci-monitor:20260828-020000

@rschu1ze

rschu1ze commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

This PR looks like @nihalzp should check :-)

@clickhouse-gh clickhouse-gh Bot added the comp-skip-index Skipping indexes (minmax, set, bloom) and their evaluation. label Sep 4, 2026
| [multiMatchAny](/reference/functions/regular-functions/string-search-functions#multiMatchAny) | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✔ |
| [in](/reference/functions/regular-functions/in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| [notIn](/reference/functions/regular-functions/in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✗ |
| [notIn](/reference/functions/regular-functions/in-functions) | ✔ | ✔ | ✔ | ✔ | ✗ | ✔ | ✗ |

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.

Please don't auto-close #116470 from this PR. That issue tracks the same useless negated-predicate index reads for tokenbf_v1 and ngrambf_v1 too, and this diff intentionally leaves those implementations alone, so Closes: would hide still-open work. Related: here (or a follow-up issue for the remaining text bloom-filter families) would match the actual scope.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Changed: the relationship line now reads Related: in both the linked-issues block and the description, so merging this no longer auto-closes the issue.

Checked before changing it: the issue reports the same overhead for tokenbf_v1 and ngrambf_v1 with their own measured 245 / 245, and this diff touches only MergeTreeIndexBloomFilter.{cpp,h}, so those two index types genuinely stay open.

I am not taking the follow-up-issue alternative. @ PedroTadim scoped the fix to bloom_filter on the issue, because tokenbf_v1 and ngrambf_v1 are deprecated. sparse_grams is not deprecated and carries the identical atoms, but all three text-family types share MergeTreeConditionBloomFilterText through bloomFilterIndexTextCreator, so declining the atoms there cannot be scoped away from the deprecated pair. The description records that residual.

@nihalzp
nihalzp added this pull request to the merge queue Sep 8, 2026
Merged via the queue into ClickHouse:master with commit ea6f2d7 Sep 8, 2026
175 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-skip-index Skipping indexes (minmax, set, bloom) and their evaluation. groeneai-origin-request PR origin: a maintainer pinged or directed groeneai pr-performance Pull request with some performance improvements 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.

6 participants