[
https://issues.apache.org/jira/browse/CALCITE-5547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719286#comment-17719286
]
Jiajun Xie commented on CALCITE-5547:
-------------------------------------
It's not difficult to fix.
{code:java}
select empno as two, * from emp natural join dept;
+------+--------+-------+--------+-----------+------+------------+---------+---------+------------+----------+
| TWO | DEPTNO | EMPNO | ENAME | JOB | MGR | HIREDATE | SAL |
COMM | DNAME | LOC |
+------+--------+-------+--------+-----------+------+------------+---------+---------+------------+----------+
| 7369 | 20 | 7369 | SMITH | CLERK | 7902 | 1980-12-17 | 800.00 |
| RESEARCH | DALLAS |
{code}
New commit is
https://github.com/apache/calcite/pull/3183/commits/25f5cb7b0547ccd26cdb7c9358c3273a8133b0de
> JOIN USING returns incorrect column names
> -----------------------------------------
>
> Key: CALCITE-5547
> URL: https://issues.apache.org/jira/browse/CALCITE-5547
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.33.0
> Reporter: Sean Broeder
> Assignee: Jiajun Xie
> Priority: Major
> Labels: pull-request-available
>
> The query
> {code:java}
> SELECT '' as \"xxx\", *
> FROM (values (1, 4, 'one')) as t1(i ,j ,t )
> LEFT JOIN (values (1, -1)) as t2(i ,k )
> USING (i) {code}
> returns columns (xxx, i, j, i0),
> but should return columns (xxx, i, j, t, k)
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)