hsyuan commented on a change in pull request #2002:
URL: https://github.com/apache/calcite/pull/2002#discussion_r435225707



##########
File path: core/src/main/java/org/apache/calcite/rel/rules/JoinCommuteRule.java
##########
@@ -145,6 +145,12 @@ public static RelNode swap(Join join, boolean 
swapOuterJoins,
         .build();
   }
 
+  public boolean matches(RelOptRuleCall call) {
+    Join join = call.rel(0);
+    // SEMI and ANTI join cannot be swapped.
+    return join.getJoinType().projectsRight();
+  }

Review comment:
       LOL. 😝
   I remembered I created that JIRA but not immediately create a pull request, 
because I had to come up with a test case.
   The code change looks good to me, but I think we'd better add a test case. :)




----------------------------------------------------------------
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:
[email protected]


Reply via email to