You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2023/04/05 07:45:00 UTC
[jira] [Commented] (IGNITE-15571) JOIN with USING fails with : USING clause is not unique on one side of join.
[ https://issues.apache.org/jira/browse/IGNITE-15571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708729#comment-17708729 ]
Evgeny Stanilovsky commented on IGNITE-15571:
---------------------------------------------
in ai-3 fixed after change calcite ver up to 1.34
> 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
> Reporter: Evgeny Stanilovsky
> Priority: Major
> Labels: calcite, calcite2-required
>
> {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)