是的 Flink SQL 现在还不支持隐式类型,需要手动设置 NULL 的类型 SQL 才能通过编译。
丁浩浩 <18579099...@163.com> 于2020年11月10日周二 下午8:52写道: > 感谢大佬!!! > > > 在 2020年11月10日,下午8:22,hailongwang <18868816...@163.com> 写道: > > > > Hi, > > > > > > 需要将 null cast 成某个具体的值,比如: > > if(type=1,2,cast(null as int)) > > > > > > Best, > > Hailong > > 在 2020-11-10 19:14:44,"丁浩浩" <18579099...@163.com> 写道: > >> 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展示吗? > > > > > > > > >