yashmayya commented on code in PR #15525:
URL: https://github.com/apache/pinot/pull/15525#discussion_r2046438796


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/MinMaxRangeAggregationFunction.java:
##########
@@ -81,10 +84,13 @@ public void aggregate(int length, AggregationResultHolder 
aggregationResultHolde
         for (int i = from; i < to; i++) {
           MinMaxRangePair minMaxRangePair = 
ObjectSerDeUtils.MIN_MAX_RANGE_PAIR_SER_DE.deserialize(bytesValues[i]);
           minMax.apply(minMaxRangePair);
+          empty.set(false);
         }
       });
     }
-    setAggregationResult(aggregationResultHolder, minMax.getMin(), 
minMax.getMax());
+    if (!empty.get()) {

Review Comment:
   Yeah the read part should definitely not be an issue, but it makes sense to 
avoid updating the atomic in the tight loop



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