Repository navigation
Better default selectivities for unknown and LIKE conditions - #101653
Merged
Merged
Conversation
davenger
marked this pull request as draft
April 2, 2026 19:22
Contributor
|
Workflow [PR], commit [71a1b57] Summary: ❌
AI ReviewSummaryThis PR adjusts default selectivity heuristics in Findings
ClickHouse Rules
Final Verdict
|
Member
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
| UInt64 not_ilike_rows = estimate("not(a ilike '%pattern%')"); | ||
| EXPECT_EQ(not_ilike_rows, 9000u); | ||
|
|
||
| /// notLike function directly: 0.9 * 10000 = 9000 rows. |
Contributor
There was a problem hiding this comment.
a not like '%pattern%' here is SQL operator syntax, not a direct notLike function call.
Please reword this comment to avoid confusion, e.g. “NOT LIKE operator directly”.
…ot affect join order and prewhere steps order Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…fault_selectivity
…fault_selectivity
Contributor
LLVM Coverage Report
Changed lines: 100.00% (54/54) · Uncovered code |
davenger
marked this pull request as ready for review
April 16, 2026 14:17
hanfei1991
approved these changes
Apr 17, 2026
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):
Improved default selectivity estimates for conditions without statistics to match industry-standard heuristics: 0.1 for
LIKEcondition selectivity, 0.33 for unknown condition selectivity.Documentation entry for user-facing changes
Version info
26.4.1.1020