NobiGo commented on code in PR #4456:
URL: https://github.com/apache/calcite/pull/4456#discussion_r2181491193


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -10136,6 +10136,32 @@ private void checkLiteral2(String expression, String 
expected) {
     sql(sql).ok(expected);
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7050";>[CALCITE-7050]
+   * Invalid unparse for FULL JOIN in MySQLDialect</a>. */
+  @Test void testUnsupportedFullJoin() {
+    // MySQL full join would transform to left join union right join
+    String sql = "select e1.\"salary\",e2.\"department_id\" from\n"
+        + "(select \"salary\", \"department_id\" from \"employee\") as e1\n"
+        + " full join "
+        + "(select \"salary\", \"department_id\" from \"employee\") as e2\n"
+        + "on e1.\"department_id\"=e2.\"department_id\"";
+    String query = "SELECT `salary`, `department_id0` AS `department_id`\n"
+        + "FROM (SELECT *\n"
+        + "FROM (SELECT `salary`, `department_id`\nFROM `foodmart`.`employee`) 
AS `t`\n"
+        + "LEFT JOIN (SELECT `salary`, `department_id`\nFROM 
`foodmart`.`employee`) AS `t0`"

Review Comment:
   Please check it again.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to