angelzouxin commented on a change in pull request #2430:
URL: https://github.com/apache/calcite/pull/2430#discussion_r648411935



##########
File path: core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java
##########
@@ -1045,6 +1045,29 @@ private LockWrapper exclusiveCleanDb(Connection c) 
throws SQLException {
         .planHasSql("SELECT \"EMPNO\", \"ENAME\"\nFROM 
\"SCOTT\".\"EMP\"\nWHERE \"EMPNO\" = ?");
   }
 
+  /**
+   * Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-4619";>[CALCITE-4619]
+   * "Full join" generates an incorrect execution plan under mysql</a>
+   */
+  @Test void testSupportedCertainJoinType() {
+    CalciteAssert.model(JdbcTest.SCOTT_MYSQL_DIALECT_MODEL)
+        .query("select empno, ename, e.deptno, dname\n"
+            + "from scott.emp e full join scott.dept d\n"
+            + "on e.deptno = d.deptno")
+        .explainContains("PLAN=EnumerableCalc(expr#0..4=[{inputs}], 
proj#0..2=[{exprs}], " +
+            "DNAME=[$t4])\n" +
+            "  EnumerableHashJoin(condition=[=($2, $3)], joinType=[full])\n" +
+            "    JdbcToEnumerableConverter\n" +
+            "      JdbcProject(EMPNO=[$0], ENAME=[$1], DEPTNO=[$7])\n" +
+            "        JdbcTableScan(table=[[SCOTT, EMP]])\n" +
+            "    JdbcToEnumerableConverter\n" +
+            "      JdbcProject(DEPTNO=[$0], DNAME=[$1])\n" +
+            "        JdbcTableScan(table=[[SCOTT, DEPT]])")
+        .enable(CalciteAssert.DB == CalciteAssert.DatabaseInstance.HSQLDB)
+        .runs();
+  }

Review comment:
       All comments are resolved now. 




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


Reply via email to