Fix SmartHLL ClassCastException in GROUP BY ORDER BY#18841
Open
ilamhs wants to merge 2 commits into
Open
Conversation
extractGroupByResult() blindly cast to Set but the holder can contain a HyperLogLog once the dict-ID cardinality threshold is exceeded via checkAndConvertToSketchForGroups. Mirror the threshold check already present in extractAggregationResult().
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18841 +/- ##
============================================
+ Coverage 64.76% 64.80% +0.03%
Complexity 1322 1322
============================================
Files 3393 3393
Lines 211022 211235 +213
Branches 33135 33206 +71
============================================
+ Hits 136676 136885 +209
+ Misses 63330 63301 -29
- Partials 11016 11049 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
checkAndConvertToSketchForGroups already converts DictIdsWrapper to sketch eagerly when the threshold is exceeded, so any DictIdsWrapper remaining in the holder at extract time is guaranteed to be below threshold. The cardinality guard added in the prior commit is dead code; remove it per reviewer feedback.
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.
extractGroupByResult() blindly cast to Set but the holder can contain a HyperLogLog once the dict-ID cardinality threshold is exceeded via checkAndConvertToSketchForGroups. Mirror the threshold check already present in extractAggregationResult().
Labels:
bugfix