rubenada commented on a change in pull request #1157: [CALCITE-2969] Improve 
design of join-like relational expressions
URL: https://github.com/apache/calcite/pull/1157#discussion_r276323531
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoinRule.java
 ##########
 @@ -71,26 +72,34 @@
         EnumerableRules.LOGGER.debug(e.toString());
         return null;
       }
-    }
-    RelNode newRel;
-    try {
-      newRel = EnumerableJoin.create(
+    } else if (info.isEqui() && join.isNonCorrelateSemiJoin()) {
+      // This is a semi-join.
+      return EnumerableNestedLoopJoin.create(
 
 Review comment:
   I think this rule should not generate EnumerableNestedLoopJoin. In my 
opinion it should be created only from LogicalCorrelate, i.e. something like:
   a) LogicalJoin == [EnumerableJoinRule] ==> EnumerableJoin (now 
EnumerableHashJoin) / EnumerableThetaJoin
   b) LogicalJoin == [JoinToCorrelateRule] ==> LogicalCorrelate == 
[EnumerableCorrelateRule] ==> EnumerableCorrelate (now EnumerableNestedLoop)

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


With regards,
Apache Git Services

Reply via email to