Repository navigation
Fix composite histogram key types with NULL components - #393
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 272 272
Lines 39076 39089 +13
=======================================
+ Hits 36495 36508 +13
Misses 2581 2581
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
What problem does this PR solve?
The
sql_execfuzz smoke test panics athistogram.rs:699: on a composite index, a NULL component reportsSqlNull, so a bucket ending at(NULL, x)failsdebug_assert_eq!(Tuple([Integer, Integer]), Tuple([SqlNull, Integer])). The same strict comparison also madeendpoint_countskip keys with NULL components.Issue link:
What is changed and how it works?
key_types_match: tuple components match when either side isSqlNull; other types still compare exactly.endpoint_count.Code changes
Check List
Tests
Side effects
Note for reviewer
Repro: index
(a, b)with somea IS NULLrows,analyze, thenselect count(*) from t where a < 193panics in debug builds.test_endpoint_count_uses_only_full_histogram_keysnow covers both cases. The assertion dates from #354; only estimates were affected, not query results.