[
https://issues.apache.org/jira/browse/CALCITE-3282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913888#comment-16913888
]
Jacky Woo edited comment on CALCITE-3282 at 8/23/19 3:38 AM:
-------------------------------------------------------------
Hi, [~danny0405]
At the beginning, we try to put the unparse logic in HiveSqlDialect just like
some rex call. But found that SqlDialect contains some unparse methods like rex
call, string literal, interval qualifier and so on, but does not contain type
node.
So we raise the idea add type unparse method to SqlDialect.
If there is no type unparse method in SqlDislect, we may use unaprseCall
method, in which way we must take all type related sql sub clause in
consideration. We think this way is too difficult.
was (Author: jackywoo):
Hi, [~danny0405]
At the beginning, we try to put the unparse logic in HiveSqlDialect just like
some rex call. But found that SqlDialect contains some unparse methods like rex
call, string literal, interval qualifier and so on, but does not contain type
node.
So we raise the idea add type unparse method to SqlDialect.
If there is no type unparse method in SqlDislect, we may use unaprseCall
method, in which way we must take all type related sql sub clause in
consideration. We think this way is to difficult.
> 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)