xiangfu0 commented on code in PR #18996:
URL: https://github.com/apache/pinot/pull/18996#discussion_r3598218721
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/PercentileTDigestAggregationFunction.java:
##########
@@ -305,13 +300,16 @@ public ColumnDataType getIntermediateResultColumnType() {
@Override
public SerializedIntermediateResult serializeIntermediateResult(TDigest
tDigest) {
+ if (tDigest instanceof PercentileTDigestAccumulator) {
+ tDigest = ((PercentileTDigestAccumulator) tDigest).toTDigest();
Review Comment:
Fixed in `912280c814`.
`PercentileTDigestAccumulator` now preserves validated pending TDigest bytes
and directly emits standard small encoding when a materialized accumulator
needs its explicit centroid capacity. Normal-sized accumulator results still
use verbose encoding.
The regression covers both lazy and materialized compression-20 /
80-centroid states through `serializeIntermediateResult()` and the stock
TDigest 3.2 reader, asserting encoding, total weight, centroid count, bounds,
and finite monotonic quantiles.
Validation: all 312 `PercentileTDigestAggregationFunctionTest` cases and all
6 `PercentileTDigestQueriesTest` cases pass; spotless, checkstyle, license
format, and license check pass for `pinot-core`.
--
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]