Repository navigation
Fix skip index analysis through casts and on missing map keys or JSON paths - #124612
Merged
CurtizJ merged 2 commits intoOct 9, 2026
Merged
Conversation
… paths
- `isLosslessConversion` compares type names instead of `equals`, which ignores
the time zone of `DateTime` and the custom name of `Bool`. A `bloom_filter`
index skipped matching rows for `CAST(dt, 'DateTime(\'UTC\')') = '...'` and
`CAST(u, 'Bool') = true`.
- The text index preprocessor is applied on top of a `CAST` that drops
`Nullable`, so `NOT hasToken(CAST(s, 'String'), ...)` still throws on NULL
instead of returning the NULL rows.
- A text index on `mapKeys` or `JSONAllPaths` evaluates the predicate on the
value of a missing key or path with `ActionsDAG::evaluatePartialResult`. If it
throws, e.g. `toUInt64('')`, the index does not answer the predicate, as in
`filterResultForNotMatchedRows`. Previously the query failed.
Closes: ClickHouse#124385
Closes: ClickHouse#124541
Closes: ClickHouse#124540
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [870c9ad] Summary: ✅
AI ReviewSummaryThis PR fixes three skip-index regressions introduced by the recent cast-looking-through work: wrong-result PR Metadata
Final Verdict
LLVM Coverage ReportMeasured on commit 870c9ad.
Changed lines: Changed C/C++ lines covered: 42/42 (100.00%) · Uncovered code |
…erseJSONSubcolumnKeyNode` PR: ClickHouse#124612 CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=124612&sha=55859d2a0a529d1d74df35b8c5d46dd9c9cf26d4&name_0=PR&name_1=Build%20%28arm_tidy%2C%203%2F4%29 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 9, 2026
Backport #124612 to 26.9: Fix skip index analysis through casts and on missing map keys or JSON paths
robot-clickhouse-ci-2
added a commit
that referenced
this pull request
Oct 10, 2026
Cherry pick #124612 to 26.7: Fix skip index analysis through casts and on missing map keys or JSON paths
robot-clickhouse
added a commit
that referenced
this pull request
Oct 10, 2026
…n missing map keys or JSON paths
robot-clickhouse-ci-2
added a commit
that referenced
this pull request
Oct 10, 2026
Cherry pick #124612 to 26.8: Fix skip index analysis through casts and on missing map keys or JSON paths
robot-clickhouse
added a commit
that referenced
this pull request
Oct 10, 2026
…n missing map keys or JSON paths
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 10, 2026
Backport #124612 to 26.8: Fix skip index analysis through casts and on missing map keys or JSON paths
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 11, 2026
Backport #124612 to 26.7: Fix skip index analysis through casts and on missing map keys or JSON paths
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.
Fixes three issues found after #123239 and #124220, which let skip indexes look through lossless conversions of the indexed column.
Closes: #124385
Closes: #124541
Closes: #124540
Related: #123239
Related: #124220
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed a query failing with an exception like
Cannot parse UInt64 from Stringon a table with a text index onmapKeysorJSONAllPaths, when the predicate cannot be evaluated on the value of a missing map key or JSON path.Workflow [PR]
Sync PR [sync-upstream/pr/124612]
Version info
26.10.1.1936-master(included in26.10and later)26.9.14.12,26.8.23.5,26.7.28.4