swuferhong commented on code in PR #21487:
URL: https://github.com/apache/flink/pull/21487#discussion_r1057031860


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/FlinkJoinToMultiJoinRule.java:
##########
@@ -348,22 +456,49 @@ private void copyOuterJoinInfo(
      * @param right Right input of the join
      * @return combined join filters AND-ed together
      */
-    private List<RexNode> combineJoinFilters(Join join, RelNode left, RelNode 
right) {
+    private List<RexNode> combineJoinFilters(
+            Join join, RelNode left, RelNode right, List<Boolean> 
inputNullGenFieldList) {
         JoinRelType joinType = join.getJoinType();
+        JoinInfo joinInfo = join.analyzeCondition();
+        ImmutableIntList leftKeys = joinInfo.leftKeys;
+        ImmutableIntList rightKeys = joinInfo.rightKeys;
 
         // AND the join condition if this isn't a left or right outer join; In 
those cases, the
         // outer join condition is already tracked separately.
         final List<RexNode> filters = new ArrayList<>();
         if ((joinType != JoinRelType.LEFT) && (joinType != JoinRelType.RIGHT)) 
{
             filters.add(join.getCondition());
         }
-        if (canCombine(left, joinType, joinType.generatesNullsOnLeft())) {
-            filters.add(((MultiJoin) left).getJoinFilter());
+        if (canCombine(
+                left,
+                leftKeys,
+                joinType,
+                joinType.generatesNullsOnLeft(),
+                true,
+                inputNullGenFieldList,
+                0)) {
+            final MultiJoin multiJoin =
+                    left instanceof Project

Review Comment:
   > can we handle the Projection now ? does any tests cover the branch ?
   
   No, I'm sorry, this part is not cleaned up from the POC code. This PR does 
not support Projection and other operators now. Supporting these operators is a 
complicated work, and many cases need to be considered. It may not be supported 
in 1.17 in my view. Thanks.



-- 
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]

Reply via email to