whitecloud6688 opened a new pull request, #19415:
URL: https://github.com/apache/flink/pull/19415

   ###  Illegal use of 'NULL'
   
   需要将 NULL 赋值给一个字段,然后写入表,但报语法错误。版本:flink-1.13.6。
   请问类似需求该怎么规避或解决呢?谢谢。
   
   Flink SQL> select if(1>2,1,NULL) as col1;
   [ERROR] Could not execute SQL statement. Reason:
   org.apache.calcite.sql.validate.SqlValidatorException: Illegal use of 'NULL'
   
   Flink SQL> select NULL as col1;
   [ERROR] Could not execute SQL statement. Reason:
   org.apache.calcite.sql.validate.SqlValidatorException: Illegal use of 'NULL'
   
   Flink SQL> select NULL is NULL as col1;
   +----+--------+
   | op |   col1 |
   +----+--------+
   | +I |   true |
   +----+--------+
   Received a total of 1 row
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to