wuchong commented on a change in pull request #9285: [FLINK-13433][table-planner-blink] Do not fetch data from LookupableTableSource if the JoinKey in left side of LookupJoin contains null value. URL: https://github.com/apache/flink/pull/9285#discussion_r310390743
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/common/CommonLookupJoinRule.scala ########## @@ -86,6 +91,22 @@ trait CommonLookupJoinRule { } } + // TODO Support `IS NOT DISTINCT FROM` in the future: FLINK-13509 + protected def validateJoin(join: FlinkLogicalJoin): Unit = { + + val filterNulls: Array[Boolean] = { + val filterNulls = new util.ArrayList[java.lang.Boolean] + JoinUtil.createJoinInfo(join.getLeft, join.getRight, join.getCondition, filterNulls) + filterNulls.map(_.booleanValue()).toArray + } + + if (filterNulls.contains(false)) { + throw new TableException( + s"Join condition ${join.getCondition.toString} is unsupported yet because " + + s"`IS NOT DISTINCT FROM` (or an expanded version) is not supported in LookupJoin.") Review comment: ```suggestion s"LookupJoin doesn't support join condition contains 'a IS NOT DISTINCT FROM b' (or alternative '(a = b) or (a IS NULL AND b IS NULL)'), the join condition is '${join.getCondition}'.") ``` ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services