Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,6 @@ static long estimateStringKeySize(@Nullable 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;
Expand Down Expand Up @@ -958,9 +957,9 @@ private static class RowBasedKeySerde implements Grouper.KeySerde<RowBasedGroupe
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;
Expand Down