You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/05/26 14:10:07 UTC

[GitHub] [calcite] rubenada commented on a change in pull request #2418: [CALCITE-4621] SemiJoinRule throws AssertionError on ANTI join

rubenada commented on a change in pull request #2418:
URL: https://github.com/apache/calcite/pull/2418#discussion_r639764325



##########
File path: core/src/main/java/org/apache/calcite/rel/rules/SemiJoinRule.java
##########
@@ -45,8 +46,9 @@
 public abstract class SemiJoinRule
     extends RelRule<SemiJoinRule.Config>
     implements TransformationRule {
-  private static boolean notGenerateNullsOnLeft(Join join) {
-    return !join.getJoinType().generatesNullsOnLeft();
+  private static boolean isJoinTypeSupported(Join join) {
+    final JoinRelType type = join.getJoinType();
+    return type != JoinRelType.RIGHT && type != JoinRelType.FULL && type != JoinRelType.ANTI;

Review comment:
       Ok, I can re-write the code using `==`.
   Regarding `SEMI`, I agree it is a bit bizarre that this rule processes this type, it may be useful to transform plans with SemiJoin + Aggregate => SemiJoin (not sure, I haven't looked in detail this scenario).
   In any case, this is out of the scope of the current patch. We can create a separate Jira to study this situation and eventually considering removing `SEMI` from this rule.




-- 
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:
users@infra.apache.org