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


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/FlinkFilterJoinRule.java:
##########
@@ -386,6 +387,21 @@ private void pushFiltersToAnotherSide(
         }
     }
 
+    private boolean isSuitableFilterToPush(RexNode filter, JoinRelType 
joinType) {
+        if (filter.isAlwaysTrue()) {
+            return false;
+        }
+        // For left/right outer join, we cannot push down IS_NULL filter to 
other side. Take left
+        // outer join as an example, If the join right side contains an 
IS_NULL filter, while we try
+        // to push it to the join left side and the left side have any other 
filter on this column,
+        // which will conflict and generate wrong plan.
+        if ((joinType == JoinRelType.LEFT || joinType == JoinRelType.RIGHT)

Review Comment:
   > for left outer join, only the equal conditions from right side can be push 
to the left side. and vice versa for right outer join.
   > 
   > please add some non equal conditions (such as a2 <> 10 ) in the IT case
   
   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

Reply via email to