nizarhejazi commented on code in PR #9086:
URL: https://github.com/apache/pinot/pull/9086#discussion_r937075991


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/SumAggregationFunction.java:
##########
@@ -102,10 +130,112 @@ public void aggregate(int length, 
AggregationResultHolder aggregationResultHolde
     aggregationResultHolder.setValue(sum);
   }
 
+  private void aggregateNullHandlingEnabled(int length, 
AggregationResultHolder aggregationResultHolder,
+      BlockValSet blockValSet, RoaringBitmap nullBitmap) {
+    double sum = 0;
+    switch (blockValSet.getValueType().getStoredType()) {
+      case INT: {
+        int[] values = blockValSet.getIntValuesSV();
+        if (nullBitmap.getCardinality() < Math.min(length, values.length)) {

Review Comment:
   I did not move before because I was not sure if we need to do the check for 
both length and values.length. Moved.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to