[
https://issues.apache.org/jira/browse/IGNITE-15592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466320#comment-17466320
]
Aleksey Plekhanov commented on IGNITE-15592:
--------------------------------------------
Looks like two of these queries have been fixed already earlier. I've fixed and
unignored the last one in IGNITE-16228
> 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
> query II
> SELECT i, (SELECT i FROM integers WHERE i IS NOT NULL EXCEPT SELECT i FROM
> integers WHERE i<>i1.i) AS j FROM integers i1 WHERE i IS NOT NULL ORDER BY i;
> ----
> 1 1
> 2 2
> 3 3
> {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.20.1#820001)