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

Benchao Li commented on CALCITE-5769:
-------------------------------------

{{CAST}} does not change nullable/not null of input, {{SAFE_CAST}}/{{TRY_CAST}} 
will. For the case of  `cast('abc' as double)`, we will throw runtime exception 
instead of returning null.

> Optimizing 'CAST(e AS t) IS NOT NULL' to 'e IS NOT NULL'
> --------------------------------------------------------
>
>                 Key: CALCITE-5769
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5769
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.34.0
>            Reporter: xiong duan
>            Priority: Major
>
> According to CALCITE-5156. We should support optimize:
>  * 'CAST(e AS t) IS NOT NULL' to 'e IS NOT NULL'
>  * 'CAST(e AS t) IS NULL' to 'e IS NULL'



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

Reply via email to