siddharthteotia commented on a change in pull request #6559:
URL: https://github.com/apache/incubator-pinot/pull/6559#discussion_r573484428



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGenerator.java
##########
@@ -61,8 +61,16 @@
  * bounded by the number of groups limit (globalGroupIdUpperBound is always 
smaller or equal to numGroupsLimit).
  */
 public class DictionaryBasedGroupKeyGenerator implements GroupKeyGenerator {
-  private final static int INITIAL_MAP_SIZE = 256;
-  private final static int MAX_CACHING_MAP_SIZE = 1048576;
+  // NOTE: map size = map capacity (power of 2) * load factor
+  private static final int INITIAL_MAP_SIZE = (int) ((1 << 10) * 0.75f);
+  private static final int MAX_CACHING_MAP_SIZE = (int) ((1 << 20) * 0.75f);
+
+  private static final ThreadLocal<IntGroupIdMap> THREAD_LOCAL_INT_MAP = 
ThreadLocal.withInitial(IntGroupIdMap::new);
+  private static final ThreadLocal<Long2IntOpenHashMap> THREAD_LOCAL_LONG_MAP =

Review comment:
       Sounds good. 




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



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

Reply via email to