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

Jacky Woo commented on CALCITE-3282:
------------------------------------

Hi, [~danny0405] [~julianhyde]

This pr by [~ffmax] derived from Hive 1.x does not support integer as type name.
{code:java}
Connected to: Apache Hive (version 1.1.0-cdh5.14.4)
Driver: Hive JDBC (version 1.1.0-cdh5.11.2)
0: localhost> select cast('1' as integer);
Error: Error while compiling statement: FAILED: ParseException line 1:19 cannot 
recognize input near 'integer' ')' '<EOF>' in primitive type specification 
(state=42000,code=40000){code}
In order to fix the problem, we try to add every SqlDialect implementation the 
ability rewriting the data type unparse logic. So we can get correct Hive sql 
by modifying HiveSqlDialect.

 

> Make every SqlDialect unparse their own data type
> -------------------------------------------------
>
>                 Key: CALCITE-3282
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3282
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: feng huang
>            Priority: Minor
>
> Every database might have different type or same type but different type 
> name, therefore making every SqlDialect parse their own data type is a 
> suitable way.
> for example, “select cast(col as int) from table” change to hive sql "select 
> cast(col as integer) from table", but "integer" is not allowed in hive.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to