[ https://issues.apache.org/jira/browse/IGNITE-15571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795084#comment-17795084 ]
Yury Gerzhedovich commented on IGNITE-15571: -------------------------------------------- [~zstan] LGTM > JOIN with USING fails with : USING clause is not unique on one side of join. > ---------------------------------------------------------------------------- > > Key: IGNITE-15571 > URL: https://issues.apache.org/jira/browse/IGNITE-15571 > Project: Ignite > Issue Type: Improvement > Components: sql > Affects Versions: 3.0.0-beta1 > Reporter: Evgeny Stanilovsky > Assignee: Evgeny Stanilovsky > Priority: Major > Labels: calcite, calcite2-required, ignite-3 > Time Spent: 20m > Remaining Estimate: 0h > > {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 IIIIIII > SELECT * FROM t1 JOIN t2 USING(a) JOIN t2 t2b USING (a) ORDER BY 1, 2, 3, 4, > 5, 6, 7 > ---- > 1 2 3 2 3 2 3 > 1 2 3 2 3 3 4 > 1 2 3 3 4 2 3 > 1 2 3 3 4 3 4 > {noformat} > fails with > {noformat} > org.apache.calcite.runtime.CalciteContextException: At line 1, column 54: > Column name 'A' in USING clause is not unique on one side of join > 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 on mysql - all ok. -- This message was sent by Atlassian Jira (v8.20.10#820010)