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 2020/03/19 17:48:40 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #1860: [CALCITE-2970] Add abstractConverter only between derived and required traitset

vlsi commented on a change in pull request #1860: [CALCITE-2970] Add abstractConverter only between derived and required traitset
URL: https://github.com/apache/calcite/pull/1860#discussion_r395211628
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/StreamTest.java
 ##########
 @@ -286,15 +286,17 @@ private static String schemaFor(String name, Class<? extends TableFactory> clazz
             + "      LogicalTableScan(table=[[STREAM_JOINS, PRODUCTS]])\n")
         .explainContains(""
             + "EnumerableCalc(expr#0..6=[{inputs}], proj#0..1=[{exprs}], SUPPLIERID=[$t6])\n"
-            + "  EnumerableHashJoin(condition=[=($4, $5)], joinType=[inner])\n"
-            + "    EnumerableCalc(expr#0..3=[{inputs}], expr#4=[CAST($t2):VARCHAR(32) NOT NULL], proj#0..4=[{exprs}])\n"
-            + "      EnumerableInterpreter\n"
-            + "        BindableTableScan(table=[[STREAM_JOINS, ORDERS, (STREAM)]])\n"
-            + "    EnumerableTableScan(table=[[STREAM_JOINS, PRODUCTS]])")
+            + "  EnumerableMergeJoin(condition=[=($4, $5)], joinType=[inner])\n"
+            + "    EnumerableSort(sort0=[$4], dir0=[ASC])\n"
+            + "      EnumerableCalc(expr#0..3=[{inputs}], expr#4=[CAST($t2):VARCHAR(32) NOT NULL], proj#0..4=[{exprs}])\n"
+            + "        EnumerableInterpreter\n"
+            + "          BindableTableScan(table=[[STREAM_JOINS, ORDERS, (STREAM)]])\n"
 
 Review comment:
   Previously `MergeJoin` was not taken because it did not really try to sort inputs. In other words, `MergeJoin` was taken **only** in case both inputs were already pre-sorted (which was only happening for literal `VALUES`).
   
   I guess now it "abstract-converts" non-sorted rels to the sorted state, so `MergeJoin` can really succeed.
   
   @hsyuan , is it the case?

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


With regards,
Apache Git Services