Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3673#discussion_r115535989 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/MapJoinLeftRunner.scala --- @@ -31,7 +32,19 @@ class MapJoinLeftRunner[IN1, IN2, OUT]( override def flatMap(multiInput: IN1, out: Collector[OUT]): Unit = { broadcastSet match { case Some(singleInput) => function.join(multiInput, singleInput, out) - case None => + case None => { --- End diff -- Why not? We configure the `CodeGenerator` to expect `null` as input (see `DataSetSingleRowJoin` line 134). The generated code will make sure we do not run into a NPE an the generated condition will be `false` if one of the input is `null`. So, we can simply do `case None if outerJoin => function.join(multiInput, null.asInstanceOf[IN2], out)` here and `case None if outerJoin => function.join(null.asInstanceOf[IN1], multiInput, out)` in `MapJoinRightRunner`. I check the generated code and this seems to be fine. Also the tests that you provided pass with that change.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---