nizarhejazi commented on code in PR #9086: URL: https://github.com/apache/pinot/pull/9086#discussion_r937066089
########## 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 have done it this way because I see in the for loop the condition is: `length & i < values.length`. Will revert. -- 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