Jackie-Jiang commented on code in PR #9566:
URL: https://github.com/apache/pinot/pull/9566#discussion_r991859596
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AvgAggregationFunction.java:
##########
@@ -67,10 +67,11 @@ public void aggregate(int length, AggregationResultHolder
aggregationResultHolde
BlockValSet blockValSet = blockValSetMap.get(_expression);
if (_nullHandlingEnabled) {
RoaringBitmap nullBitmap = blockValSet.getNullBitmap();
- if (nullBitmap != null && !nullBitmap.isEmpty()) {
- aggregateNullHandlingEnabled(length, aggregationResultHolder,
blockValSet, nullBitmap);
- return;
+ if (nullBitmap == null) {
Review Comment:
We shouldn't need to change it for AVG because we are already storing object
instead of double
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/MaxAggregationFunction.java:
##########
@@ -73,10 +73,11 @@ public void aggregate(int length, AggregationResultHolder
aggregationResultHolde
BlockValSet blockValSet = blockValSetMap.get(_expression);
if (_nullHandlingEnabled) {
RoaringBitmap nullBitmap = blockValSet.getNullBitmap();
- if (nullBitmap != null && !nullBitmap.isEmpty()) {
- aggregateNullHandlingEnabled(length, aggregationResultHolder,
blockValSet, nullBitmap);
- return;
+ if (nullBitmap == null) {
Review Comment:
Ideally we still want to avoid the null bitmap check when it is `null` or
empty for better performance. We can merge this fix for now, but let's add a
TODO to track it. Same for other functions that uses double result holder
--
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]