This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push: new 4a025fe KYLIN-3776 Float type in MySQL not properly converted to HIVE Double Type 4a025fe is described below commit 4a025fe11db7dd2ea31bf7028eb368ebd2d72553 Author: hit-lacus <hit_la...@126.com> AuthorDate: Mon Jan 21 00:23:42 2019 +0800 KYLIN-3776 Float type in MySQL not properly converted to HIVE Double Type In Hive DDL manual, the precision/scale of double and float is not configurable --- source-jdbc/src/main/java/org/apache/kylin/source/jdbc/SqlUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source-jdbc/src/main/java/org/apache/kylin/source/jdbc/SqlUtil.java b/source-jdbc/src/main/java/org/apache/kylin/source/jdbc/SqlUtil.java index d090b14..6363112 100644 --- a/source-jdbc/src/main/java/org/apache/kylin/source/jdbc/SqlUtil.java +++ b/source-jdbc/src/main/java/org/apache/kylin/source/jdbc/SqlUtil.java @@ -159,6 +159,7 @@ public class SqlUtil { } public static boolean isScaleApplicable(String typeName) { - return DataType.NUMBER_FAMILY.contains(typeName) && !DataType.INTEGER_FAMILY.contains(typeName); + return !"double".equalsIgnoreCase(typeName) && !"float".equalsIgnoreCase(typeName) && + DataType.NUMBER_FAMILY.contains(typeName) && !DataType.INTEGER_FAMILY.contains(typeName); } }