kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject [01/10] kylin git commit: KYLIN-918 change ‘float’ to ‘double’ when sync a hive table into kylin [Forced Update!]
Date Fri, 04 Mar 2016 10:03:36 GMT
Repository: kylin
Updated Branches:
  refs/heads/1.x-HBase1.1.3 4313900e6 -> cb0537b19 (forced update)


KYLIN-918 change ‘float’ to ‘double’ when sync a hive table into kylin

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

Branch: refs/heads/1.x-HBase1.1.3
Commit: 7b94e7f6f4ec75e7a57d1ee515cd6ec91d5f49f6
Parents: f6bc652
Author: shaofengshi <shaofengshi@apache.org>
Authored: Wed Mar 2 17:03:53 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Wed Mar 2 17:03:53 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/metadata/tool/HiveSourceTableLoader.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/7b94e7f6/metadata/src/main/java/org/apache/kylin/metadata/tool/HiveSourceTableLoader.java
----------------------------------------------------------------------
diff --git a/metadata/src/main/java/org/apache/kylin/metadata/tool/HiveSourceTableLoader.java
b/metadata/src/main/java/org/apache/kylin/metadata/tool/HiveSourceTableLoader.java
index 39b4f93..480acc9 100644
--- a/metadata/src/main/java/org/apache/kylin/metadata/tool/HiveSourceTableLoader.java
+++ b/metadata/src/main/java/org/apache/kylin/metadata/tool/HiveSourceTableLoader.java
@@ -124,7 +124,12 @@ public class HiveSourceTableLoader {
                 FieldSchema field = fields.get(i);
                 ColumnDesc cdesc = new ColumnDesc();
                 cdesc.setName(field.getName().toUpperCase());
-                cdesc.setDatatype(field.getType());
+                // use "double" in kylin for "float"
+                if ("float".equalsIgnoreCase(field.getType())) {
+                    cdesc.setDatatype("double");
+                } else {
+                    cdesc.setDatatype(field.getType());
+                }
                 cdesc.setId(String.valueOf(i + 1));
                 columns.add(cdesc);
             }


Mime
View raw message