[
https://issues.apache.org/jira/browse/CALCITE-3381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16968902#comment-16968902
]
Danny Chen commented on CALCITE-3381:
-------------------------------------
A following up patch fixed in
[4e70e7f|https://github.com/apache/calcite/commit/4e70e7f3e44832667c2e82e371d6539a68d029fa],
thanks for your PR, [~amaliujia] !
> When generating SQL for BigQuery (via unparsing), convert Calcite SQL types
> to BigQuery types
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-3381
> URL: https://issues.apache.org/jira/browse/CALCITE-3381
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.21.0
> Reporter: Kirill Kozlov
> Assignee: Rui Wang
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> When using `SqlImplementor.SimpleContext#toSql` with BigQuerySqlDialect on
> Rel nodes containing `CAST` need to convert Calcite SqlTypeName to BigQuery
> supported types
> ([https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types]).
> I believe this can be accomplished by Overriding
> BigQuerySqlDialect#getCastSpec method.
> Example: VARCHAR should become a STRING, BOOLEAN - BOOL, and so on.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)