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

Caican Cai commented on CALCITE-6397:
-------------------------------------

[~julianhyde] [~mbudiu] I would like to ask a question. The type check of NVL2 
(2.0, 'abc', true) in calcite is allowed. The string type and the boolean type 
are comparable. I am not sure about this. According to my understanding, this 
is is not allowed.

I have tested the nvl function and there are similar problems, but the nvl 
function has restrictions on the return value type, so it may not be easy to 
find, but I think this problem should be found in the type check.

That is, the SameOperatndTypeChecker method should fail.

> Add NVL2 function (enabled in Spark library)
> --------------------------------------------
>
>                 Key: CALCITE-6397
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6397
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Caican Cai
>            Priority: Major
>              Labels: pull-request-available
>
> Add NVL2 function (enabled in Spark library)
>  
> https://spark.apache.org/docs/2.3.0/api/sql/index.html#nvl2



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

Reply via email to