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 2019/12/06 02:42:24 UTC

[GitHub] [calcite] chunweilei commented on a change in pull request #1637: [CALCITE-3571] RelBuilder#shouldMergeProject throws an exception for joins with complex conditions

chunweilei commented on a change in pull request #1637: [CALCITE-3571] RelBuilder#shouldMergeProject throws an exception for joins with complex conditions
URL: https://github.com/apache/calcite/pull/1637#discussion_r354643787
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java
 ##########
 @@ -92,6 +94,15 @@ protected final void check(
     sql(sql).convertsTo(plan);
   }
 
+  // TODO(CALCITE-3571): Passes when RelBuilder#shouldMergeProject returns false.
+  @Ignore public void testJoinWithMergeProjectShouldParse() {
+    final String sql = "WITH query as (select empno, deptno as deptno11, deptno as deptno12 from emp)\n"
+        + "select query.deptno11, emp.deptno, query.deptno12\n"
+        + "FROM query\n"
+        + "JOIN emp ON (cast(query.empno as Integer) = cast(emp.empno as Integer))";
+    sql(sql).ok();
+  }
 
 Review comment:
   IMHO, what you propose is only a workaround. Users might encounter this error if he wants to merge the project in RelBuilder. Instead of changing `RelBuilder#shouldMergeProject` to false, I am wondering if we can find the root cause and fix it.

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