kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject [1/2] kylin git commit: KYLIN-1911 NPE when extended column has NULL value
Date Sun, 24 Jul 2016 12:32:49 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 0f81ed283 -> 57569a7dc


KYLIN-1911 NPE when extended column has NULL value


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

Branch: refs/heads/master
Commit: 57569a7dc3144a82873941e20c4139d008e9512d
Parents: 22f09c1
Author: Hongbin Ma <mahongbin@apache.org>
Authored: Sun Jul 24 20:19:34 2016 +0800
Committer: Hongbin Ma <mahongbin@apache.org>
Committed: Sun Jul 24 20:19:40 2016 +0800

----------------------------------------------------------------------
 .../kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/57569a7d/core-metadata/src/main/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java
b/core-metadata/src/main/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java
index d566331..dc718d1 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/extendedcolumn/ExtendedColumnMeasureType.java
@@ -147,6 +147,11 @@ public class ExtendedColumnMeasureType extends MeasureType<ByteArray>
{
 
             @Override
             public void reload(Object measureValue) {
+                if (measureValue == null) {
+                    value = null;
+                    return;
+                }
+                
                 ByteArray byteArray = (ByteArray) measureValue;
                 //the array in ByteArray is guaranteed to be completed owned by the ByteArray
                 value = Bytes.toString(byteArray.array());


Mime
View raw message