ankitsultana commented on code in PR #14981:
URL: https://github.com/apache/pinot/pull/14981#discussion_r1941785723


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/groupby/GroupIdGeneratorFactory.java:
##########
@@ -25,24 +25,27 @@ public class GroupIdGeneratorFactory {
   private GroupIdGeneratorFactory() {
   }
 
-  public static GroupIdGenerator getGroupIdGenerator(ColumnDataType[] 
keyTypes, int numKeyColumns, int numGroupsLimit) {
+  public static GroupIdGenerator getGroupIdGenerator(ColumnDataType[] 
keyTypes, int numKeyColumns,
+      int numGroupsLimit, int maxInitialResultHolderCapacity) {
+    // Initial capacity is one more than expected to avoid rehashing if 
container is full.
+    int initialCapacity = 1 + Math.min(maxInitialResultHolderCapacity, 
numGroupsLimit);

Review Comment:
   Hash table resize would happen based on load factor though right? Adding 1 
here might not do much.



##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -756,6 +757,8 @@ public static class Server {
         "pinot.server.query.executor.group.trim.size";
     public static final String 
CONFIG_OF_QUERY_EXECUTOR_MAX_INITIAL_RESULT_HOLDER_CAPACITY =
         "pinot.server.query.executor.max.init.group.holder.capacity";
+    public static final String 
CONFIG_OF_QUERY_EXECUTOR_MSE_MAX_INITIAL_RESULT_HOLDER_CAPACITY =
+        "pinot.server.query.executor.mse.max.init.group.holder.capacity";

Review Comment:
   I think we could remove `query.executor` fragment from this altogether. 
afaik query.executor refers to ServerQueryExecutorV1Impl and the corresponding 
interface, which are V1 Engine constructs. That would yield:
   
   ```
   pinot.server.mse.max.init.group.holder.capacity
   ```



-- 
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: commits-unsubscr...@pinot.apache.org

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