vlsi 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_r281107984
 
 

 ##########
 File path: 
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java
 ##########
 @@ -86,18 +88,17 @@
         .query(
             "select empid, name from emps e where e.deptno in (select d.deptno 
from depts d)")
         .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner -> {
-          // force the semi-join to run via EnumerableCorrelate instead of 
EnumerableJoin/SemiJoin
-          planner.addRule(JoinToCorrelateRule.SEMI);
-          planner.removeRule(EnumerableRules.ENUMERABLE_JOIN_RULE);
+          // force the semi-join to run via EnumerableCorrelate
+          // instead of EnumerableHashJoin/SemiJoin
+          planner.addRule(JoinToCorrelateRule.JOIN);
           planner.removeRule(EnumerableRules.ENUMERABLE_SEMI_JOIN_RULE);
         })
         .explainContains(""
             + "EnumerableCalc(expr#0..2=[{inputs}], empid=[$t0], name=[$t2])\n"
-            + "  EnumerableCorrelate(correlation=[$cor1], joinType=[semi], 
requiredColumns=[{1}])\n"
+            + "  EnumerableHashJoin(condition=[=($1, $3)], joinType=[semi])\n"
 
 Review comment:
   @danny0405 , does this mean `Correlate` no longer works?
   Previous plan used `correlate` while new is using HashJoin. This looks like 
a degradation.

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


With regards,
Apache Git Services

Reply via email to