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 2016/11/02 08:44:18 UTC

[05/33] kylin git commit: KYLIN-2134 Kylin will treat empty string as NULL by mistake

KYLIN-2134 Kylin will treat empty string as NULL by mistake


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

Branch: refs/heads/v1.6.0-rc1-cdh5.7
Commit: 1af3d9ee31f3edd64eea336c65b7619b078efdbf
Parents: cd2a06a
Author: Hongbin Ma <ma...@apache.org>
Authored: Thu Oct 27 15:22:54 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Thu Oct 27 15:25:48 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/metadata/tuple/Tuple.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/1af3d9ee/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
index aaf9aa9..9074403 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/tuple/Tuple.java
@@ -178,7 +178,7 @@ public class Tuple implements ITuple {
         if (strValue == null)
             return null;
 
-        if ((strValue.equals("") || strValue.equals("\\N")) && !dataTypeName.equals("string"))
+        if ((strValue.equals("") || strValue.equals("\\N")) && !dataTypeName.equals("string") && !dataTypeName.startsWith("varchar"))
             return null;
 
         // TODO use data type enum instead of string comparison