gortiz commented on code in PR #14071:
URL: https://github.com/apache/pinot/pull/14071#discussion_r1777015391
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CountAggregationFunction.java:
##########
@@ -145,12 +145,23 @@ public void aggregateGroupBySV(int length, int[]
groupKeyArray, GroupByResultHol
@Override
public void aggregateGroupByMV(int length, int[][] groupKeysArray,
GroupByResultHolder groupByResultHolder,
Map<ExpressionContext, BlockValSet> blockValSetMap) {
- if (blockValSetMap.isEmpty() ||
!blockValSetMap.containsKey(STAR_TREE_COUNT_STAR_EXPRESSION)) {
+ if (blockValSetMap.isEmpty()) {
for (int i = 0; i < length; i++) {
for (int groupKey : groupKeysArray[i]) {
groupByResultHolder.setValueForKey(groupKey,
groupByResultHolder.getDoubleResult(groupKey) + 1);
}
}
+ } else if (_nullHandlingEnabled) {
Review Comment:
nit: IIRC benchmarks shown that performance is almost the same if we don't
check for `_nullHandlingEnabled` and simply call forEachNotNull. But I may be
wrong
--
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]