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

ASF GitHub Bot commented on KYLIN-3776:
---------------------------------------

hit-lacus commented on pull request #437: KYLIN-3776 Float type in MySQL not 
properly converted to HIVE Double …
URL: https://github.com/apache/kylin/pull/437
 
 
   In Hive DDL manual, the precision/scale of double and float is not 
configurable
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> 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
>
>  
> 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