[
https://issues.apache.org/jira/browse/CALCITE-7050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan updated CALCITE-7050:
--------------------------------
Description:
The SQL in MySQL:
{code:java}
SELECT * FROM test002 as table1 full join test002 as table2 on table1.id1 =
table2.id1; {code}
throws exception:
{code:java}
SQL ERROR [1064] [42000]: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to
use near 'full join test002 as table2 on table1.id1 = table2.id1 {code}
Test case in RelToSqlConverterTest:
{code:java}
@Test void testFullJoin() {
String sql = "select *\n"
+ "from \"store\" as s\n"
+ "full join \"employee\" as e on true\n";
final String expectedMysql = "SELECT *\n"
+ "FROM `foodmart`.`store`\n"
+ "FULL JOIN `foodmart`.`employee` ON TRUE";
sql(sql).withMysql().ok(expectedMysql);
} {code}
We already have `supportsJoinType` when the jointype is JoinRelTpte.FULL return
false.
was:
The SQL in MySQL:
{code:java}
SELECT * FROM test002 as table1 full join test002 as table2 on table1.id1 =
table2.id1; {code}
throws exception:
{code:java}
SQL 错误 [1064] [42000]: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use near
'full join test002 as table2 on table1.id1 = table2.id1 {code}
Test case in RelToSqlConverterTest:
{code:java}
@Test void testFullJoin() {
String sql = "select *\n"
+ "from \"store\" as s\n"
+ "full join \"employee\" as e on true\n";
final String expectedMysql = "SELECT *\n"
+ "FROM `foodmart`.`store`\n"
+ "FULL JOIN `foodmart`.`employee` ON TRUE";
sql(sql).withMysql().ok(expectedMysql);
} {code}
We already have `supportsJoinType` when the jointype is JoinRelTpte.FULL return
false.
> Invalid unparse for FULL JOIN in MySQLDialect
> ----------------------------------------------
>
> Key: CALCITE-7050
> URL: https://issues.apache.org/jira/browse/CALCITE-7050
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Priority: Major
>
> The SQL in MySQL:
> {code:java}
> SELECT * FROM test002 as table1 full join test002 as table2 on table1.id1 =
> table2.id1; {code}
> throws exception:
> {code:java}
> SQL ERROR [1064] [42000]: You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right syntax to
> use near 'full join test002 as table2 on table1.id1 = table2.id1 {code}
> Test case in RelToSqlConverterTest:
> {code:java}
> @Test void testFullJoin() {
> String sql = "select *\n"
> + "from \"store\" as s\n"
> + "full join \"employee\" as e on true\n";
> final String expectedMysql = "SELECT *\n"
> + "FROM `foodmart`.`store`\n"
> + "FULL JOIN `foodmart`.`employee` ON TRUE";
> sql(sql).withMysql().ok(expectedMysql);
> } {code}
> We already have `supportsJoinType` when the jointype is JoinRelTpte.FULL
> return false.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)