Jackie-Jiang commented on code in PR #15308:
URL: https://github.com/apache/pinot/pull/15308#discussion_r2003890517
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/array/ArrayAggDistinctDoubleFunction.java:
##########
@@ -39,14 +39,15 @@ public void aggregate(int length, AggregationResultHolder
aggregationResultHolde
Map<ExpressionContext, BlockValSet> blockValSetMap) {
BlockValSet blockValSet = blockValSetMap.get(_expression);
double[] value = blockValSet.getDoubleValuesSV();
- DoubleOpenHashSet valueArray = new DoubleOpenHashSet(length);
+ DoubleOpenHashSet valueSet = aggregationResultHolder.getResult() != null ?
aggregationResultHolder.getResult()
+ : new DoubleOpenHashSet(length);
Review Comment:
(minor) Suggest following the same convention as other aggregates, same for
other places
```suggestion
DoubleOpenHashSet valueSet = aggregationResultHolder.getResult();
if (valueSet == null) {
valueSet = new DoubleOpenHashSet(length);
aggregationResultHolder.setValue(valueSet);
}
```
--
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]