Fix wrong results with distributed index analysis and query condition cache#98269
Merged
azat merged 2 commits intoClickHouse:masterfrom Mar 2, 2026
Merged
Fix wrong results with distributed index analysis and query condition cache#98269azat merged 2 commits intoClickHouse:masterfrom
azat merged 2 commits intoClickHouse:masterfrom
Conversation
Contributor
|
Workflow [PR], commit [cfdab89] Summary: ❌
|
… cache Writes to QCC depends on part_index_in_query which was incorrect after DIA Also QCC may split part ranges, and we will have more ranges, but this is OK, since it will be still correct, but only do more work. To address DIA should support analysis of separate ranges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
KochetovNicolai
approved these changes
Mar 2, 2026
Member
KochetovNicolai
left a comment
There was a problem hiding this comment.
Looks fine.
I guess this code used the invariant that ranges would be sorted
Member
Author
|
Yes, it assumes that both are sorted, otherwise it cannot be match here - And will assume that the part was erased completely |
Merged
via the queue into
ClickHouse:master
with commit Mar 2, 2026
2ee5214
146 of 148 checks passed
robot-clickhouse-ci-2
added a commit
that referenced
this pull request
Mar 2, 2026
Cherry pick #98269 to 26.2: Fix wrong results with distributed index analysis and query condition cache
robot-clickhouse
added a commit
that referenced
this pull request
Mar 2, 2026
…lysis and query condition cache
clickhouse-gh bot
added a commit
that referenced
this pull request
Mar 3, 2026
Backport #98269 to 26.2: Fix wrong results with distributed index analysis and query condition cache
alexey-milovidov
added a commit
that referenced
this pull request
Mar 5, 2026
…ry condition cache PR #82380 moved Query Condition Cache filtering before the distributed index analysis code path. QCC can split a single mark range into multiple ranges when it has cached data about which marks don't match. PR #98269 removed the same assertion from `distributedIndexAnalysis.cpp` but missed this one in `ReadFromMergeTree.cpp`. The assertion is unnecessary since the ranges are immediately replaced on the next line. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98770&sha=ad7e094fdd4b057b0bac0acb5b505270f79f3b3d&name_0=PR&name_1=AST%20fuzzer%20%28amd_debug%29 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 wrong results with distributed index analysis (experimental feature) and query condition cache
Writes to QCC depends on part_index_in_query which was incorrect after DIA
Also QCC may split part ranges, and we will have more ranges, but this is OK, since it will be still correct, but only do more work. To address DIA should support analysis of separate ranges.
This pops up during testing