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

Evgeny Stanilovsky updated IGNITE-15592:
----------------------------------------
    Description: 
{noformat}
statement ok
CREATE TABLE integers(i INTEGER)

statement ok
INSERT INTO integers VALUES (1), (2), (3), (NULL)

# implicit join with correlated expression in filter
query II
SELECT i, (SELECT s1.i FROM integers s1, integers s2 WHERE s1.i=s2.i AND 
s1.i=4-i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
----
NULL    NULL
1       3
2       2
3       1

# join with a correlated expression in the join condition
query II
SELECT i, (SELECT s1.i FROM integers s1 INNER JOIN integers s2 ON s1.i=s2.i AND 
s1.i=4-i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
----
NULL    NULL
1       3
2       2
3       1
{noformat}


{noformat}
/subquery/scalar/test_complex_correlated_subquery.test[_ignore]
{noformat}

checked with mysql, all ok there.

  was:
{noformat}
statement ok
CREATE TABLE integers(i INTEGER)

statement ok
INSERT INTO integers VALUES (1), (2), (3), (NULL)

# implicit join with correlated expression in filter
query II
SELECT i, (SELECT s1.i FROM integers s1, integers s2 WHERE s1.i=s2.i AND 
s1.i=4-i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
----
NULL    NULL
1       3
2       2
3       1
{noformat}


{noformat}
/subquery/scalar/test_complex_correlated_subquery.test[_ignore]
{noformat}

checked with mysql, all ok there.


> Calcite. Unexpected result with implicit join with correlated expression in 
> filter.
> -----------------------------------------------------------------------------------
>
>                 Key: IGNITE-15592
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15592
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required, ignite-3
>
> {noformat}
> statement ok
> CREATE TABLE integers(i INTEGER)
> statement ok
> INSERT INTO integers VALUES (1), (2), (3), (NULL)
> # implicit join with correlated expression in filter
> query II
> SELECT i, (SELECT s1.i FROM integers s1, integers s2 WHERE s1.i=s2.i AND 
> s1.i=4-i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
> ----
> NULL  NULL
> 1     3
> 2     2
> 3     1
> # join with a correlated expression in the join condition
> query II
> SELECT i, (SELECT s1.i FROM integers s1 INNER JOIN integers s2 ON s1.i=s2.i 
> AND s1.i=4-i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
> ----
> NULL  NULL
> 1     3
> 2     2
> 3     1
> {noformat}
> {noformat}
> /subquery/scalar/test_complex_correlated_subquery.test[_ignore]
> {noformat}
> checked with mysql, all ok there.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to