kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [21/50] [abbrv] kylin git commit: change ‘float’ to ‘double’ when sync a hive table into kylin
Date Thu, 10 Mar 2016 07:50:24 GMT
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/3fb67ca7
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3fb67ca7
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3fb67ca7

Branch: refs/heads/master
Commit: 3fb67ca78a6059aa0f350607299cc3551042b1b5
Parents: bc7d4f5
Author: shaofengshi <shaofengshi@apache.org>
Authored: Wed Mar 2 17:12:10 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Wed Mar 2 17:12:10 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/kylin/blob/3fb67ca7/source-hive/src/main/java/org/apache/kylin/source/hive/HiveSourceTableLoader.java
----------------------------------------------------------------------
diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveSourceTableLoader.java
b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveSourceTableLoader.java
index f2f2d2a..2aef4e6 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveSourceTableLoader.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveSourceTableLoader.java
@@ -123,7 +123,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