jihoonson commented on a change in pull request #9655: Fix wrong cardinality 
computation in BufferArrayGrouper
URL: https://github.com/apache/druid/pull/9655#discussion_r406555229
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/BufferArrayGrouper.java
 ##########
 @@ -69,12 +69,20 @@
   @Nullable
   private int[] vAggregationRows = null;
 
-  static long requiredBufferCapacity(
-      int cardinality,
-      AggregatorFactory[] aggregatorFactories
-  )
+  /**
+   * Computes required buffer capacity for a grouping key of the given 
cardinaltiy and aggregatorFactories.
+   * This method assumes that the given cardinality doesn't count nulls.
+   *
+   * Returns -1 if it cardinality + 1 (for null) = Integer.MAX_VALUE. Returns 
computed required buffer capacity
 
 Review comment:
   Oops, thanks!

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to