[ 
https://issues.apache.org/jira/browse/FLINK-26363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

luoyuxia updated FLINK-26363:
-----------------------------
    Description: 
Using hive dialect, can be reproduced using the following sql

{code:sql}
select if(1=1, 2,3)
{code}

Then it'll throw such exception " Mismatch of function's argument data type 
'BOOLEAN NOT NULL' and actual argument type 'BOOLEAN'.".

The main reason is ScalarOperatorGens always generates expressions will 
nullable return type, which can be different from the inferred type in Calcite.
We need to fix it in ScalarOperatorGens.

  was:
Using hive dialect, can be reproduced using the following sql

{code:sql}
select if(1=1, 2,3)
{code}



> Fail to use such expression like if(1= 1, 2, 3)
> -----------------------------------------------
>
>                 Key: FLINK-26363
>                 URL: https://issues.apache.org/jira/browse/FLINK-26363
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Connectors / Hive
>            Reporter: luoyuxia
>            Priority: Major
>
> Using hive dialect, can be reproduced using the following sql
> {code:sql}
> select if(1=1, 2,3)
> {code}
> Then it'll throw such exception " Mismatch of function's argument data type 
> 'BOOLEAN NOT NULL' and actual argument type 'BOOLEAN'.".
> The main reason is ScalarOperatorGens always generates expressions will 
> nullable return type, which can be different from the inferred type in 
> Calcite.
> We need to fix it in ScalarOperatorGens.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to