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

Will Noble commented on CALCITE-6117:
-------------------------------------

It will trigger [this 
assertion|https://github.com/apache/calcite/blob/3843ede3d28783235780c0f81f725dc7e64a7828/core/src/main/java/org/apache/calcite/sql/fun/SqlCastFunction.java#L254]
 because the sql call only has 1 argument.

> Unparsing SAFE_CAST is broken
> -----------------------------
>
>                 Key: CALCITE-6117
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6117
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Will Noble
>            Priority: Trivial
>              Labels: pull-request-available
>
> BigQuery's {{SAFE_CAST}} function operates much like {{CAST}}. Currently, the 
> unparsing logic is broken because it does not use the [special logic for 
> {{CAST}}|https://github.com/apache/calcite/blob/94dc1673da824174f9271677ead73cfae1aeb29b/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java#L816]
>  in {{SqlImplementor.callToSql}} that turns the rex call's return type into 
> the sql call's second argument.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to