You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2015/11/02 09:03:56 UTC

incubator-kylin git commit: support global dict in IIKeyValueCodec

Repository: incubator-kylin
Updated Branches:
  refs/heads/KYLIN-1112 b65c9a840 -> b4a16eb89


support global dict in IIKeyValueCodec

Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/b4a16eb8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/b4a16eb8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/b4a16eb8

Branch: refs/heads/KYLIN-1112
Commit: b4a16eb898130e25a1f30032286127da1e462208
Parents: b65c9a8
Author: shaofengshi <sh...@apache.org>
Authored: Mon Nov 2 16:03:38 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Mon Nov 2 16:03:38 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/b4a16eb8/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
----------------------------------------------------------------------
diff --git a/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java b/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
index 7e54a98..eebf756 100644
--- a/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
+++ b/invertedindex/src/main/java/org/apache/kylin/invertedindex/model/IIKeyValueCodec.java
@@ -199,7 +199,7 @@ public class IIKeyValueCodec implements KeyValueCodec {
                             valueContainers[curCol] = c;
                         } else {
                             final ImmutableBytesWritable dictBytes = row.getDictionary();
-                            if (dictBytes.getLength() != 0) {
+                            if (dictBytes.get() != null && dictBytes.getLength() != 0) {
                                 final Dictionary<?> dictionary = DictionarySerializer.deserialize(new ByteArray(dictBytes.get(), dictBytes.getOffset(), dictBytes.getLength()));
                                 CompressedValueContainer c = new CompressedValueContainer(dictionary.getSizeOfId(), dictionary.getMaxId() - dictionary.getMinId() + 1, 0);
                                 c.fromBytes(row.getValue());