[jira] [Commented] (CALCITE-3282) make every SqlDialect parse their own data type

2019-08-22 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-3282:
--

Oh, you meant "unparse" rather than "parse".

And you created a pull request but didn't attach it to this case.

Very confusing.

> make every SqlDialect parse 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)


[jira] [Commented] (CALCITE-3282) make every SqlDialect parse their own data type

2019-08-22 Thread Julian Hyde (Jira)


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

Julian Hyde commented on CALCITE-3282:
--

This would be a task for the Babel parser, I presume. Babel would parse 
everything, and unknown types would be parsed as if they were user-defined 
types, then we could validate against the list of types supported in that 
database.

It wouldn't be defined in SqlDialect, because SqlDialect is about generating 
SQL, more likely SqlConformance or SqlParser.Config.

> make every SqlDialect parse 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)


[jira] [Commented] (CALCITE-3282) make every SqlDialect parse their own data type

2019-08-22 Thread Danny Chan (Jira)


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

Danny Chan commented on CALCITE-3282:
-

Sounds reasonable, but i can not figure out a proper way to fix "every" sql 
dialect, there are kinds of sql dialects we supported, every sql dialect have 
they own unparse logic, so, to keep all these type sync with every dialect 
seems not an easy work. 

We may need to make sure what sql dialect we want to fix first then make the 
type list that need fix.

> make every SqlDialect parse 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)