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

Evgeny Stanilovsky updated IGNITE-22306:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> Sql. Natural join Column name when encountered more than once must be 
> ambiguous
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-22306
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22306
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> Query:
> {noformat}
> select * from (values (1)) t1(i) join (values (1)) t2(i) on (t1.i=t2.i) 
> natural join (values (1)) t3(i);
> {noformat}
> Should return an error because the left table of the outermost join consists 
> of two columns named "i".
> *Query breakdown*
> Q1 (wrapped in select )
> {noformat}
> select * from (
> (values (1)) t1(i) join (values (1)) t2(i) on (t1.i=t2.i)
> ) q1
> # returns i, i
> # 1, 1
> {noformat}
> Q2 (wrapped in select )
> {noformat}
> select * from (
> (values (1)) t3(i);
> ) q2
> # returns i
> # 1
> {noformat}
> Since Q1 consists of two columns named "i" it is not possible to reference 
> this column.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to