You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/04/29 08:26:00 UTC

[jira] [Updated] (CALCITE-7085) JOIN USING with unqualified common column fails in a conformance where allowQualifyingCommonColumn is false (e.g. Oracle, Presto)

     [ https://issues.apache.org/jira/browse/CALCITE-7085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CALCITE-7085:
------------------------------------
    Labels: pull-request-available  (was: )

> JOIN USING with unqualified common column fails in a conformance where allowQualifyingCommonColumn is false (e.g. Oracle, Presto)
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7085
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7085
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Viggo Chen
>            Priority: Major
>              Labels: pull-request-available
>
> SeeĀ SqlToRelConverterTest [test case |https://github.com/apache/calcite/commit/7990aa521103f4af1f690dd5152b972f69df0a0b]
> {code:java}
> // FIXME: fails with "Cannot qualify common column 'EMP.DEPTNO'"
> @Test void testJoinUsingWithUnqualifiedCommonColumnWhenDisallowsQualifyingCommonColumn() {
>   final String sql = "SELECT deptno, name\n"
>       + "FROM emp JOIN dept using (deptno)";
>   sql(sql).withConformance(SqlConformanceEnum.ORACLE_10).ok();
> } {code}
> deptno is expanded to COALESCE(`EMP`.`DEPTNO`, `DEPT`.`DEPTNO`) AS `DEPTNO` and fails because ORACLE disallows qualifying common column



--
This message was sent by Atlassian Jira
(v8.20.10#820010)