danny0405 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_r281179147
########## 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: @vlsi You are right, i have force the test cases to produce `EnumerableCorrelate`, but because we deprecate `JoinToCorrelateRule#SEMI`, now the `Correlate` with an `agg` as one input is a cheaper plan. ---------------------------------------------------------------- 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