jihoonson closed pull request #6261: [Backport] RowBasedKeySerde should use 
empty dictionary in constructor
URL: https://github.com/apache/incubator-druid/pull/6261
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/processing/src/main/java/io/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java
 
b/processing/src/main/java/io/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java
index fa4f2a95aea..aec0676e2a0 100644
--- 
a/processing/src/main/java/io/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java
+++ 
b/processing/src/main/java/io/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java
@@ -916,7 +916,6 @@ static long estimateStringKeySize(String key)
 
   private static class RowBasedKeySerde implements 
Grouper.KeySerde<RowBasedGrouperHelper.RowBasedKey>
   {
-    private static final int DICTIONARY_INITIAL_CAPACITY = 10000;
     private static final int UNKNOWN_DICTIONARY_ID = -1;
 
     private final boolean includeTimestamp;
@@ -962,9 +961,9 @@ static long estimateStringKeySize(String key)
       this.valueTypes = valueTypes;
       this.limitSpec = limitSpec;
       this.enableRuntimeDictionaryGeneration = dictionary == null;
-      this.dictionary = enableRuntimeDictionaryGeneration ? new 
ArrayList<>(DICTIONARY_INITIAL_CAPACITY) : dictionary;
+      this.dictionary = enableRuntimeDictionaryGeneration ? new ArrayList<>() 
: dictionary;
       this.reverseDictionary = enableRuntimeDictionaryGeneration ?
-                               new 
Object2IntOpenHashMap<>(DICTIONARY_INITIAL_CAPACITY) :
+                               new Object2IntOpenHashMap<>() :
                                new Object2IntOpenHashMap<>(dictionary.size());
       this.reverseDictionary.defaultReturnValue(UNKNOWN_DICTIONARY_ID);
       this.maxDictionarySize = maxDictionarySize;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to