Hi,

需要将 null cast 成某个具体的值,比如:
if(type=1,2,cast(null as int))


Best,
Hailong
在 2020-11-10 19:14:44,"丁浩浩" <[email protected]> 写道:
>Select 
>       id,
>       name,
>       if(type=1,2,null) 
>From
>       user ;
>当我执行上面的sql的时候提示我
>[ERROR] Could not execute SQL statement. Reason:
>org.apache.calcite.sql.validate.SqlValidatorException: Illegal use of ‘NULL’ 
>是无法将null展示吗?



回复