Skip to content

Fix SmartHLL ClassCastException in GROUP BY ORDER BY#18841

Open
ilamhs wants to merge 2 commits into
apache:masterfrom
ilamhs:fix/smart-hll-group-by-classcast
Open

Fix SmartHLL ClassCastException in GROUP BY ORDER BY#18841
ilamhs wants to merge 2 commits into
apache:masterfrom
ilamhs:fix/smart-hll-group-by-classcast

Conversation

@ilamhs

@ilamhs ilamhs commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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

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().
@Jackie-Jiang Jackie-Jiang added bug Something is not working as expected query Related to query processing labels Jun 23, 2026
@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.80%. Comparing base (63bf8dc) to head (c3447bd).
⚠️ Report is 12 commits behind head on master.

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     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.80% <100.00%> (+0.03%) ⬆️
temurin 64.80% <100.00%> (+0.03%) ⬆️
unittests 64.79% <100.00%> (+0.03%) ⬆️
unittests1 57.02% <100.00%> (+0.04%) ⬆️
unittests2 37.16% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working as expected query Related to query processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants