Repository navigation
fix: reject groups accumulator for bit_xor(DISTINCT) - #24989
Merged
jayzhan211 merged 3 commits intoSep 13, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24989 +/- ##
==========================================
- Coverage 81.88% 81.88% -0.01%
==========================================
Files 1133 1133
Lines 424522 424522
Branches 424522 424522
==========================================
- Hits 347623 347611 -12
- Misses 56285 56296 +11
- Partials 20614 20615 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jayzhan211
previously approved these changes
Sep 7, 2026
jayzhan211
left a comment
Contributor
There was a problem hiding this comment.
Thanks @jackylee-ch 👍🏻
jayzhan211
reviewed
Sep 7, 2026
| fn groups_accumulator_supported(&self, _args: AccumulatorArgs) -> bool { | ||
| true | ||
| fn groups_accumulator_supported(&self, args: AccumulatorArgs) -> bool { | ||
| !args.is_distinct |
Contributor
There was a problem hiding this comment.
Should we limit operator to XOR only, since AND and OR are idempotent so DISTINCT does not change their result and they keep the vectorized path.
Also, do we need to handle null case? This could be a follow-up issue
Suggested change
| !args.is_distinct | |
| !(args.is_distinct && self.operation == BitwiseOperationType::Xor) |
AND and OR are idempotent, so DISTINCT does not change their result and they keep the vectorized path.
jayzhan211
approved these changes
Sep 13, 2026
jayzhan211
left a comment
Contributor
There was a problem hiding this comment.
Thanks @jackylee-ch 👍🏻
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.
Which issue does this PR close?
Rationale for this change
bit_xor(DISTINCT c)withGROUP BYfails withcolumn types must match schema types, expected List(Int16) but found Int16:groups_accumulator_supportedignoredis_distinct, so the plan got the non-distinct groups accumulator whilestate_fieldsdeclared theListstate.What changes are included in this PR?
groups_accumulator_supportednow returns false only forbit_xor(DISTINCT), matchingaccumulatorandstate_fields.bit_andandbit_orare idempotent, so they keep the vectorized path.What is the testing strategy for this PR?
Three
aggregate.sltqueries: the two shapesSingleDistinctToGroupBydoes not rewrite (a non-distinct aggregate alongside, aFILTER) fail onmain; abit_and/bit_orDISTINCTrow pins the narrower predicate.Are there any user-facing changes?
bit_xor(DISTINCT)withGROUP BYnow works. No API change.