xiangfu0 opened a new pull request, #19534:
URL: https://github.com/apache/pinot/pull/19534

   GROUP BY top-K trimming allocates sort-key arrays and intermediate wrappers 
for rejected candidates. Reuse this storage across consecutive rejections, 
creating a wrapper with the current key/record when a candidate is admitted. 
Immediate admissions keep the existing path; comparator, tie handling and 
output order are preserved.
   
   Three alternating JMH pairs on JDK25 / Apple M2 Max, including construction 
of `TableResizer`:
   
   | Scenario | Paired speed ratio | Allocation reduction |
   | --- | ---: | ---: |
   | 8192 groups, K20, random | 2.259× | 97.3% |
   | 100000 groups, K5000, random | 1.160× | 74.5% |
   | 8192 groups, K20, best-first | 1.245× | 99.2% |
   | 8192 groups, K20, all admitted | 0.971× (~3% slower) | unchanged |
   
   [Full report, all ten controls and raw 
results](https://github.com/xiangfu0/pinot/blob/680abb1c8ca109712ef7fcb7b112a6aa5263a779/pinot-perf/benchmark-results/groupby-topk-20260912/README.md).
 The small all-admitted slowdown is a measured tradeoff. These are component 
results, excluding parsing, scanning, aggregation, input-map preparation, JNI 
and transport; they do not establish query-level throughput or universal 
speedup.
   
   Validation: **81 tests passed**, including table resizing, indexed tables, 
sorted combine operators and cross-segment GROUP BY queries. New tests cover 
rejection runs, exact identities/order, ties, both resize directions, 
nulls/NaN/signed zero and aggregate-state ownership. Every benchmark fork 
checks its complete result against an independent oracle. Spotless, checkstyle 
and license goals passed. Independent correctness, testing and performance 
reviews found no actionable issues.
   
   Scoped lint passed with no source warnings; four dependency-manifest path 
warnings remain. Full-reactor Xlint was not rerun: the same-base attempt for 
the preceding row-buffer change failed in unchanged 
`ZstandardDecompressor.java:51` on a missing JetBrains annotation. Normal 
compilation/tests pass.
   
   Reproduction commands and benchmark scenarios are documented in 
`pinot-perf/README.md`. This PR is independent of the DataTable row-buffer PR 
and is based directly on upstream master `5771d6acea60`.
   


-- 
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