swuferhong commented on code in PR #21487: URL: https://github.com/apache/flink/pull/21487#discussion_r1057030213
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/FlinkJoinToMultiJoinRule.java: ########## @@ -178,6 +193,60 @@ public void onMatch(RelOptRuleCall call) { call.transformTo(multiJoin); } + private void buildInputNullGenFieldList( + RelNode left, RelNode right, JoinRelType joinType, List<Boolean> isNullGenFieldList) { + if (joinType == JoinRelType.INNER) { + buildNullGenFieldList(left, isNullGenFieldList); + buildNullGenFieldList(right, isNullGenFieldList); + } else if (joinType == JoinRelType.LEFT) { + // left judge. + buildNullGenFieldList(left, isNullGenFieldList); + + for (int i = 0; i < right.getRowType().getFieldCount(); i++) { + isNullGenFieldList.add(true); + } + } else if (joinType == JoinRelType.RIGHT) { + for (int i = 0; i < left.getRowType().getFieldCount(); i++) { + isNullGenFieldList.add(true); + } + + // right judge. + buildNullGenFieldList(right, isNullGenFieldList); + } else if (joinType == JoinRelType.FULL) { + for (int i = 0; i < left.getRowType().getFieldCount(); i++) { + isNullGenFieldList.add(true); + } + for (int i = 0; i < right.getRowType().getFieldCount(); i++) { + isNullGenFieldList.add(true); + } + } Review Comment: > nit: it's better we could add some comments to explain what's the behavior is the `else` branch Done! -- 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