Skip to content

Use the bloom filter index for LEFT ARRAY JOIN - #124426

Merged
yariks5s merged 15 commits into
masterfrom
yarik/bloom-filter-array-join-unwrap-argument
Oct 16, 2026
Merged

yariks5s merged 15 commits into
masterfrom
yarik/bloom-filter-array-join-unwrap-argument

Conversation

@yariks5s

@yariks5s yariks5s commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Related: #109536

Changelog category (leave one):

  • Performance Improvement

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

The bloom_filter index is now used for LEFT ARRAY JOIN


Stack created with GitHub Stacks CLI • Give Feedback 💬


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

Version info

  • Merged into: 26.11.1.72-master (included in 26.11 and later)
  • Backported to: 26.10.2.67

@yariks5s
yariks5s added this pull request to stack #124427 October 7, 2026 13:00
@clickhouse-gh

clickhouse-gh Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d8303ba]

Summary: ✅


AI Review

Summary

The PR enables bloom_filter pruning through LEFT ARRAY JOIN and emptyArrayToSingle when predicates reject padded defaults. No unresolved code findings remain at d8303ba5c415f033d83d872eb9fa59843fd6ecfb; the earlier expression-index regression is fixed. Both focused stateless tests pass, as do 216 comparisons with indexes enabled versus disabled. A selective lookup over 1,000,000 rows reads 21,504 rows with the index.

PR Metadata

Performance Improvement is appropriate. The required changelog entry describes the affected feature specifically, but still advertises the removed Dynamic cast support. Suggested replacement:

The bloom_filter index on an array can now be used with LEFT ARRAY JOIN and arrayJoin(emptyArrayToSingle(col)) when the predicate rejects the padded default element.

Findings

💡 Nits

  • PR description, Changelog entry: Remove the claim that arrayJoin over col::Dynamic::Array(String) uses the array index. With the PR's CI binary, the direct array lookup uses idx_tags and selects 1/10 granules, while the advertised cast roundtrip has no matching index in EXPLAIN. Use the replacement above.
Final Verdict

Status: ✅ Approve. Correct the stale changelog claim before publishing the release notes.

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Oct 7, 2026
@yariks5s
yariks5s marked this pull request as draft October 7, 2026 13:05
@clickhouse-gh clickhouse-gh Bot added the comp-skip-index Skipping indexes (minmax, set, bloom) and their evaluation. label Oct 7, 2026
@yariks5s yariks5s changed the title Use the bloom filter index for arrayJoin of an array inside emptyArrayToSingle or a lossless conversion Use the bloom filter index for arrayJoin(emptyArrayToSingle(arr)) Oct 7, 2026
@yariks5s
yariks5s removed this pull request from stack #124427 October 9, 2026 15:10
@yariks5s
yariks5s marked this pull request as ready for review October 9, 2026 16:19
@yariks5s yariks5s changed the title Use the bloom filter index for arrayJoin(emptyArrayToSingle(arr)) Use the bloom filter index for LEFT ARRAY JOIN Oct 9, 2026
@yariks5s
yariks5s changed the base branch from yarik/skip-index-dynamic-cast-round-trip to master October 9, 2026 16:42
@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit d8303ba5c415f033d83d872eb9fa59843fd6ecfb was not compared: the CI logs cluster did not answer (every POST attempt failed with an exception; stopped retrying after the 1250 s read budget).

See the job log for details.

@yariks5s
yariks5s requested a review from nihalzp October 9, 2026 20:23
@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

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

no significant changes detected. K_source=6 K_base=30 flagged=0/65

clickbench

🟢 No significant changes

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: b123ca06-7e15-4652-87e5-b633d83f4d26
  • MIRAI run: 5f8d7fee-c172-4529-a99a-ae66ef6c020b
  • PR check IDs:
    • clickbench_609556_1791584542
    • clickbench_609653_1791584555
    • clickbench_609750_1791584559
    • tpch_adapted_1_official_609846_1791584574
    • tpch_adapted_1_official_609953_1791584593
    • tpch_adapted_1_official_610080_1791584670

@nihalzp nihalzp self-assigned this Oct 10, 2026
@yariks5s
yariks5s added this pull request to the merge queue Oct 16, 2026
Merged via the queue into master with commit 7dbc66b Oct 16, 2026
177 checks passed
@yariks5s
yariks5s deleted the yarik/bloom-filter-array-join-unwrap-argument branch October 16, 2026 11:44
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 16, 2026
@groeneai groeneai mentioned this pull request Oct 19, 2026
1 task done
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Oct 21, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 21, 2026
PedroTadim added a commit that referenced this pull request Oct 21, 2026
Backport #124426 to 26.10: Use the bloom filter index for `LEFT ARRAY JOIN`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-skip-index Skipping indexes (minmax, set, bloom) and their evaluation. pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo v26.10-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants