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/03/04 03:02:53 UTC
[12/43] kylin git commit: change ‘float’ to ‘double’ when sync a hive table into kylin
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/helix-rebase
Commit: 3fb67ca78a6059aa0f350607299cc3551042b1b5
Parents: bc7d4f5
Author: shaofengshi <sh...@apache.org>
Authored: Wed Mar 2 17:12:10 2016 +0800
Committer: shaofengshi <sh...@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);
}