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 fa4f2a95aea0..aec0676e2a01 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 { - private static final int DICTIONARY_INITIAL_CAPACITY = 10000; private static final int UNKNOWN_DICTIONARY_ID = -1; private final boolean includeTimestamp; @@ -962,9 +961,9 @@ private static class RowBasedKeySerde implements Grouper.KeySerde(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;