[
https://issues.apache.org/jira/browse/IGNITE-15570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iurii Gerzhedovich updated IGNITE-15570:
----------------------------------------
Epic Link: IGNITE-22700
> JOIN with USING with common column names failed.
> ------------------------------------------------
>
> Key: IGNITE-15570
> URL: https://issues.apache.org/jira/browse/IGNITE-15570
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Evgeny Stanilovsky
> Priority: Major
> Labels: calcite, calcite2-required, calcite3-required, ignite-3
>
> {noformat}
> statement ok
> CREATE TABLE t1 (a INTEGER, b INTEGER, c INTEGER)
> statement ok
> INSERT INTO t1 VALUES (1,2,3)
> statement ok
> CREATE TABLE t2 (a INTEGER, b INTEGER, c INTEGER)
> statement ok
> INSERT INTO t2 VALUES (1,2,3), (2,2,4), (1,3,4)
> query I
> SELECT a+1 FROM t1 JOIN t2 USING(a) ORDER BY a
> ----
> 2
> 2
> {noformat}
> failed with
> {noformat}
> org.apache.calcite.runtime.CalciteContextException: At line 1, column 46:
> Column 'A' is ambiguous
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at
> org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:506)
> at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:917)
> at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:902)
> {noformat}
> {noformat}
> /join/inner/test_using_join.test[_ignore]
> {noformat}
> checked with mysql - all ok there.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)