Repository navigation
Add NaN-in-PK index range test with multi-row granule (PR #98964) - #99716
Merged
zlareb1 merged 2 commits intoMar 18, 2026
Merged
Conversation
…98964) PR ClickHouse#98964 fixed `checkInHyperrectangle` in `KeyCondition.cpp` to handle NaN correctly in index range analysis. The PR's own test (`04031`) uses `index_granularity = 1`, so each value is in its own granule and the `left.isNaN()` branch (first granule boundary) is hit for the NaN granule. With `index_granularity = 8192` all values land in a single granule whose right bound is NaN. This exercises the `key_range.right.isNaN()` branch at `KeyCondition.cpp:4205` that was not covered by the PR's own test. Also adds a `Nullable(Float32)` variant with NaN and NULL in the same granule. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
|
Workflow [PR], commit [d29d43d] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test ( Missing context
ClickHouse Rules
Final Verdict
|
NaN in primary key is a core `MergeTree` feature available in fasttest. The existing `04031_nan_in_pk_index_binary_search.sql` only carries `no-random-merge-tree-settings`, not `no-fasttest`. Keep the latter tag. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
alexey-milovidov
approved these changes
Mar 18, 2026
alexey-milovidov
left a comment
Member
There was a problem hiding this comment.
Good test, ready to merge!
zlareb1
marked this pull request as ready for review
March 18, 2026 10:17
zlareb1
enabled auto-merge
March 18, 2026 10:17
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.
Add a NaN-in-PK index range test exercising the
right.isNaN()branch atKeyCondition.cpp:4205(PR #98964). The PR's own test (04031) usesindex_granularity = 1; withindex_granularity = 8192all values fall in a single granule whose right bound is NaN, exercising the previously-untested branch. Also adds aNullable(Float32)variant.Created with Claude.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.3.1.785