yashmayya commented on code in PR #14071:
URL: https://github.com/apache/pinot/pull/14071#discussion_r1778023036


##########
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:
   Yep, performance was not the concern here, but the fact that we need to 
handle non-empty vs empty blocks differently (see my other comment 
[here](https://github.com/apache/pinot/pull/14071#discussion_r1778020911)).



-- 
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]

Reply via email to