snuyanzin commented on code in PR #21759:
URL: https://github.com/apache/flink/pull/21759#discussion_r1097977860
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/CalcITCase.scala:
##########
@@ -1835,6 +1938,18 @@ class CalcITCase extends BatchTestBase {
checkResult(
"SELECT IF(a = '' OR a IS NULL, 'a', 'b') FROM MyTable",
Seq(row('a'), row('b'), row('a')))
+ checkResult(
+ "SELECT IF(a IN ('', ' ') OR a IS NULL, 'a', 'b') FROM MyTable",
+ Seq(row('a'), row('b'), row('a')))
+ checkResult(
+ "SELECT IF(a IN ('', ' ') OR a IS NOT NULL, 'a', 'b') FROM MyTable",
+ Seq(row('a'), row('a'), row('b')))
+ checkResult(
+ "SELECT IF(a NOT IN ('', ' ') OR a IS NULL, 'a', 'b') FROM MyTable",
+ Seq(row('b'), row('a'), row('a')))
+ checkResult(
+ "SELECT IF(a NOT IN ('', ' ') OR a IS NOT NULL, 'a', 'b') FROM MyTable",
+ Seq(row('a'), row('a'), row('b')))
Review Comment:
not sure that more data help here...
the issue is that the difference for `IN`/`NOT INT` in these cases is
compensated by same ` OR IS NOT NULL`.
Instead I added `nullAs == RexUnknownAs.FALSE` and `nullAs ==
RexUnknownAs.UNKNOWN` cases
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]