Jackie-Jiang opened a new pull request, #20108:
URL: https://github.com/apache/pinot/pull/20108

   ## Summary
   
   Follow-up to #20074, which made the final result of an aggregation function 
the stored value of its type, e.g. `double[]` for `DOUBLE_ARRAY`. `HISTOGRAM`, 
`SUMARRAYLONG` and `SUMARRAYDOUBLE` still kept fastutil lists as intermediate 
results, so extracting a final result copied the list into an array unless it 
was exactly sized. They now keep `double[]` / `long[]` intermediates:
   - The final result is the intermediate itself, with no copy.
   - `HISTOGRAM` counts a value with `bins[binId]++` instead of 
`DoubleVectorOpUtils.incrementElementByOne`, which checked a precondition per 
value. It counts each block straight into the aggregated histogram, instead of 
building a histogram per block and merging it in.
   - `SUM_ARRAY` adds straight into the array, and regrows it to the exact 
length when a longer input arrives.
   
   The `mergeFinalResult` implementations from #20098 already work on the 
arrays and stay unchanged, except that `HISTOGRAM`'s now merges into a copy of 
the first final result with `merge`. The copy remains necessary: neither final 
result may be modified, since a final result can be shared (e.g. broadcast in 
the multi-stage engine).
   
   ## Serialization
   
   `ObjectSerDeUtils` gains `LONG_ARRAY_SER_DE` and `DOUBLE_ARRAY_SER_DE`, 
which serialize arrays in the format of `LONG_ARRAY_LIST_SER_DE` / 
`DOUBLE_ARRAY_LIST_SER_DE`; the list codecs now share their code. The arrays 
have no `ObjectType` of their own: the functions send them as 
`ObjectType.LongArrayList` / `ObjectType.DoubleArrayList`, so the serialized 
bytes are unchanged and mixed-version clusters work in both directions.
   
   `ArrayListUtils` and `DoubleVectorOpUtils` have no users left and are 
removed.
   
   🤖 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]

Reply via email to