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 2021/09/23 09:42:00 UTC

[jira] [Updated] (IGNITE-15570) JOIN with USING with common column names failed.

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

Evgeny Stanilovsky updated IGNITE-15570:
----------------------------------------
    Description: 
{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.

  was:

{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}

checked with mysql - all ok there.


> 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.3.4#803005)