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/07/16 17:06:36 UTC

[GitHub] [calcite] jamesstarr commented on a change in pull request #2385: [CALCITE-4686] SubQueryRemoveRule.matchJoin should correctly rewrite all sub-queries

jamesstarr commented on a change in pull request #2385:
URL: https://github.com/apache/calcite/pull/2385#discussion_r671404467



##########
File path: core/src/test/resources/org/apache/calcite/test/RelOptRulesTest.xml
##########
@@ -3295,9 +3295,9 @@ LogicalProject(DEPTNO=[$7])
       <![CDATA[
 LogicalProject(EMPNO=[$0])
   LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8], DEPTNO0=[$9], NAME=[$10])
-    LogicalJoin(condition=[true], joinType=[left])
+    LogicalCorrelate(correlation=[$cor0], joinType=[left], requiredColumns=[{7}])
       LogicalTableScan(table=[[CATALOG, SALES, EMP]])
-      LogicalJoin(condition=[=($7, $11)], joinType=[inner])
+      LogicalJoin(condition=[=($cor0.DEPTNO, $2)], joinType=[inner])

Review comment:
       Yes, the previous plan was wrong, and the new plan is better.
   
   This test was previously off and would throw an exception while building the rel nodes.  If you disabled the litimus check, then the original plan is what was generated.    




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

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org