nizarhejazi commented on code in PR #9086:
URL: https://github.com/apache/pinot/pull/9086#discussion_r935075754


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CountAggregationFunction.java:
##########
@@ -75,6 +94,20 @@ public void aggregate(int length, AggregationResultHolder 
aggregationResultHolde
       Map<ExpressionContext, BlockValSet> blockValSetMap) {
     if (blockValSetMap.isEmpty()) {
       
aggregationResultHolder.setValue(aggregationResultHolder.getDoubleResult() + 
length);
+    } else if (!blockValSetMap.containsKey(STAR_TREE_COUNT_STAR_EXPRESSION)) {
+      if (!_nullHandlingEnabled) {

Review Comment:
   @Jackie-Jiang We have three branches:
   1- `blockValSetMap.isEmpty()` for `count(*)`, and no StarTree.
   2- `!blockValSetMap.containsKey(STAR_TREE_COUNT_STAR_EXPRESSION)` for 
count(columnName), and no StarTree (please see the `!` at the beginning). 
Example: `count(bigDecimalColumn)`. Note: we can have count(bigDecimalColumn) 
and nullHandling is either enable or not enabled.
   3- StarTree.
   
   
   



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