You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by gi...@apache.org on 2018/08/29 00:22:22 UTC
[incubator-druid] branch master updated: RowBasedKeySerde should
use empty dictionary in constructor (#6256)
This is an automated email from the ASF dual-hosted git repository.
gian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new fcf8c8d RowBasedKeySerde should use empty dictionary in constructor (#6256)
fcf8c8d is described below
commit fcf8c8d53c6920a6dac6690594a7547663ffa2e5
Author: Dayue Gao <dy...@gmail.com>
AuthorDate: Wed Aug 29 08:22:18 2018 +0800
RowBasedKeySerde should use empty dictionary in constructor (#6256)
---
.../io/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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 2ae1dde..3acd2fd 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
@@ -912,7 +912,6 @@ public class RowBasedGrouperHelper
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;
@@ -958,9 +957,9 @@ public class RowBasedGrouperHelper
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;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org