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/05 02:33:40 UTC

[17/19] incubator-kylin git commit: support global dict in IIKeyValueCodec

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/37d0602c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/37d0602c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/37d0602c

Branch: refs/heads/KYLIN-1112-2
Commit: 37d0602c1d7a0d8af3c1fdf2908cb4917f8b5ad2
Parents: 805a4a6
Author: shaofengshi <sh...@apache.org>
Authored: Mon Nov 2 16:03:38 2015 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Nov 5 09:24:17 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/37d0602c/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());