[ 
https://issues.apache.org/jira/browse/KYLIN-3776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16753025#comment-16753025
 ] 

ASF subversion and git services commented on KYLIN-3776:
--------------------------------------------------------

Commit 20a74830b1550dbeee2b231a230cf738620be187 in kylin's branch 
refs/heads/2.6.x from hit-lacus
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=20a7483 ]

KYLIN-3776 Float type in MySQL not properly converted to HIVE Double Type


> 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
>            Assignee: XiaoXiang Yu
>            Priority: Major
>             Fix For: v2.6.1
>
>
>  
> 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)

Reply via email to