[
https://issues.apache.org/jira/browse/FLINK-18164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17127557#comment-17127557
]
Leonard Xu commented on FLINK-18164:
------------------------------------
I think the issue depends on Calcite how to handle the two- and three-valued
boolean logic[1], return false is correct behavior from now because Calcite
parse where clause using *UNKNOWN_AS_FALSE* mode[2].
[1]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L1016]
[2]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java#L3462]
> null <> 'str' should be true
> ----------------------------
>
> Key: FLINK-18164
> URL: https://issues.apache.org/jira/browse/FLINK-18164
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Benchao Li
> Priority: Major
>
> Currently, if we compare null with other literals, the result will always be
> false.
> It's because the code gen always gives a default value (false) for the
> result. And I think it's a bug if `null <> 'str'` is false.
> It's reported from user-zh:
> http://apache-flink.147419.n8.nabble.com/flink-sql-null-false-td3640.html
> CC [~jark] [~ykt836]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)