nizarhejazi commented on code in PR #9086: URL: https://github.com/apache/pinot/pull/9086#discussion_r935084912
########## pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/SumAggregationFunction.java: ########## @@ -28,13 +30,23 @@ import org.apache.pinot.core.query.aggregation.groupby.DoubleGroupByResultHolder; import org.apache.pinot.core.query.aggregation.groupby.GroupByResultHolder; import org.apache.pinot.segment.spi.AggregationFunctionType; +import org.roaringbitmap.RoaringBitmap; public class SumAggregationFunction extends BaseSingleInputAggregationFunction<Double, Double> { private static final double DEFAULT_VALUE = 0.0; + private final boolean _nullHandlingEnabled; + + private final Set<Integer> _groupKeysWithNonNullValue; Review Comment: I just double checked Presto behaviour and Sum returns null not zero: ``` SELECT sum(id) as sum, key FROM (VALUES (null, 1), (null, 1), (null, 2), (1, 3), (null, 3)) AS t(id, key) GROUP BY key ORDER BY key DESC; sum | key ------+----- 1 | 3 NULL | 2 NULL | 1 ``` Updated to be like `MIN` and `MAX`. -- 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