mayankshriv commented on a change in pull request #5798:
URL: https://github.com/apache/incubator-pinot/pull/5798#discussion_r465294347



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/DistinctCountThetaSketchAggregationFunction.java
##########
@@ -387,12 +386,17 @@ public void aggregateGroupByMV(int length, int[][] 
groupKeysArray, GroupByResult
   public Map<String, Sketch> extractAggregationResult(AggregationResultHolder 
aggregationResultHolder) {
     Map<Predicate, Union> unionMap = aggregationResultHolder.getResult();
     if (unionMap == null || unionMap.isEmpty()) {
-      return Collections.emptyMap();
+      return null;

Review comment:
       Yes, see merge(), there's a null check there. I had added 
`Collections.emptyMap()` in the previous PR, only to realize that it could be 
null. You are right it doesn't have to be null, but having it null saves a few 
cpu cycles in merge, I guess.




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

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

Reply via email to