Jackie-Jiang opened a new pull request, #20201:
URL: https://github.com/apache/pinot/pull/20201
## Summary
Set-mode `FUNNELCOUNT` could fail with a `ClassCastException` when merging
intermediate results.
A segment without rows contributes empty `ObjectOpenHashSet` step sets,
whatever the stored type of the correlation column. When those were the first
merge operand, the int, long, float or double values of the other side were
boxed into them. The merged list was then serialized with the string set codec,
which threw on the boxed values.
`SetMergeStrategy.merge` now takes the other side as a whole when every step
set of one side is empty, so the step sets of one list keep a single set type.
When both sides have values, it still merges in place. Swapping in the other
side per step would not be enough: merging typed sets `[{7}, {}]` with an empty
segment's sets would leave `[{7}, <empty object set>]`, and serialization picks
the set codec from the first step.
The wire format is unchanged: the `List` type, the set type from the stored
type of the correlation column, and an empty step list as its size alone.
`FunnelCountSerDeTest.testMergeSetStepsWithEmptySegment` merges an
empty-segment result with INT step sets in both orders and checks the
serialized bytes and the final counts.
This failure predates #20186 and was left there as a TODO, which this change
removes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]