Hubert STEFANI created KYLIN-3776:
-------------------------------------
Summary: Float type in MySQL not properly converted to HIVE Double
Type
Key: KYLIN-3776
URL: https://issues.apache.org/jira/browse/KYLIN-3776
Project: Kylin
Issue Type: Bug
Components: RDBMS Source
Affects Versions: v2.6.0
Reporter: Hubert STEFANI
when loading a table from mysql as source, the float type is converted as HIVE
Double type, but a precision information is added which gives an error while
creating hive table.
{quote}CREATE EXTERNAL TABLE IF NOT EXISTS
kylin_intermediate_cube_commande_777b5b14_570a_338a_25b4_b55ad6388a93
(
COMMANDE_COM_CODE_POSTAL int
,COMMANDE_COM_COMMUNE string
... ,COMMANDE_COM_MONTANT double(12)
)
{quote}
the correct code should be :
{quote}... ,COMMANDE_COM_MONTANT double
{quote}
It seems that SqlUtil class should not include "double" as a type with scale
{color:#000080}public static boolean {color}isScaleApplicable(String typeName) {
{color:#000080}return
{color}DataType.{color:#660e7a}NUMBER_FAMILY{color}.contains(typeName) &&
!DataType.{color:#660e7a}INTEGER_FAMILY{color}.contains(typeName);
}
should be changed for something similar to :
{color:#000080}public static boolean {color}isScaleApplicable(String typeName) {
{color:#000080}return {color}!{color:#008000}"double"{color}.equals(typeName)
&& DataType.{color:#660e7a}NUMBER_FAMILY{color}.contains(typeName) &&
!DataType.{color:#660e7a}INTEGER_FAMILY{color}.contains(typeName);
}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)