Repository navigation
Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate - #98776
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [e854004] Summary: ❌
|
azat
marked this pull request as draft
March 4, 2026 19:52
This comment was marked as outdated.
This comment was marked as outdated.
azat
force-pushed
the
fix-set-index-with-or
branch
from
March 4, 2026 23:01
15bd4ee to
0cb13a0
Compare
azat
force-pushed
the
fix-set-index-with-or
branch
from
March 4, 2026 23:04
0cb13a0 to
e98e653
Compare
azat
marked this pull request as ready for review
March 4, 2026 23:04
Member
|
Test failures in |
shankar-iyer
approved these changes
Mar 5, 2026
azat
enabled auto-merge
March 5, 2026 07:30
…, 0)) predicate The problem was that MergeTreeIndexConditionSet::checkDAGUseless() has noe more check for bools (getBool(0) == 0)), which is not correct for OR (only for AND).
azat
force-pushed
the
fix-set-index-with-or
branch
from
March 5, 2026 07:31
e98e653 to
e854004
Compare
Merged
via the queue into
ClickHouse:master
with commit Mar 5, 2026
06a133e
145 of 146 checks passed
robot-clickhouse
added a commit
that referenced
this pull request
Mar 5, 2026
…h OR with false (i.e. or(x, 0)) predicate
robot-clickhouse
added a commit
that referenced
this pull request
Mar 5, 2026
… OR with false (i.e. or(x, 0)) predicate
robot-clickhouse
added a commit
that referenced
this pull request
Mar 5, 2026
… OR with false (i.e. or(x, 0)) predicate
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 5, 2026
Backport #98776 to 26.1: Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate
clickhouse-gh Bot
added a commit
that referenced
this pull request
Mar 5, 2026
Backport #98776 to 26.2: Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate
azat
added a commit
that referenced
this pull request
Mar 5, 2026
Backport #98776 to 25.12: Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate
alexey-milovidov
added a commit
that referenced
this pull request
Apr 24, 2026
Per reviewer feedback, `functional_tests_jobs_azure` should only run in master and the private repo, not in every pull request. Running them per-PR was expensive and exposed the feedback loop to Microsoft Azure outages, which we already hit on PR #98776. The jobs remain in `ci/workflows/master.py` so the master branch still exercises the Azure storage integration. Addresses review feedback on PR #102354.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate
Fixes: #87781
Note
Medium Risk
Changes set skipping-index applicability logic for OR predicates, which can alter query plans and index selection. Risk is limited to optimization behavior but could affect performance or
force_data_skipping_indicesexpectations.Overview
Fixes
MergeTreeIndexConditionSet::checkDAGUselessto treat constant-false children inor(...)as identity elements, preventingor(non_indexed_predicate, 0)from incorrectly making the set index look usable.Adds a stateless regression test covering
or(a = 5, 0)(index must not be used) andor(b = 5, 0)(index must still be used) when forcingidx_b.Written by Cursor Bugbot for commit e854004. This will update automatically on new commits. Configure here.
Version info
26.3.1.42526.2.4.24,26.1.5.11,25.12.9.18