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

Aleksey Plekhanov resolved IGNITE-15595.
----------------------------------------
    Fix Version/s: 2.15
         Assignee: Aleksey Plekhanov
       Resolution: Fixed

Resolved by calcite version upgrade, tests unignored by IGNITE-16053 

> Calcite. Correlated expressions with subquery can be planned.
> -------------------------------------------------------------
>
>                 Key: IGNITE-15595
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15595
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Evgeny Stanilovsky
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required, ignite-3
>             Fix For: 2.15
>
>
> {noformat}
> statement ok
> CREATE TABLE integers(i INTEGER)
> statement ok
> INSERT INTO integers VALUES (1), (2), (3), (NULL)
> # union with correlated expression
> query II
> SELECT i, (SELECT i FROM integers WHERE i=i1.i UNION SELECT i FROM integers 
> WHERE i=i1.i) AS j FROM integers i1 ORDER BY i NULLS FIRST;
> ----
> NULL  NULL
> 1     1
> 2     2
> 3     3
> # join on two subqueries that both have a correlated expression in them
> query II
> SELECT i, (SELECT s1.i FROM (SELECT i FROM integers WHERE i=i1.i) s1 INNER 
> JOIN (SELECT i FROM integers WHERE i=4-i1.i) s2 ON s1.i>s2.i) AS j FROM 
> integers i1 ORDER BY i;
> ----
> NULL  NULL
> 1     NULL
> 2     NULL
> 3     3
> {noformat}
> {noformat}
> /subquery/scalar/test_complex_correlated_subquery.test[_ignore]
> {noformat}
> {noformat}
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImplc{1}]
>  Unexpected error at query optimizer.
> org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There are not 
> enough rules to produce a node with desired properties: convention=IGNITE, 
> sort=[0 ASC-nulls-first], distr=single, rewindability=one-way, 
> correlation=uncorrelated.
> Missing conversions are LogicalFilter[convention: NONE -> IGNITE, distr: any 
> -> random], IgniteUnionAll[sort: [] -> [0]], LogicalFilter[convention: NONE 
> -> IGNITE, sort: [] -> [0], distr: any -> random, rewindability: one-way -> 
> rewindable], LogicalFilter[convention: NONE -> IGNITE, distr: any -> single], 
> LogicalFilter[convention: NONE -> IGNITE, distr: any -> single, 
> rewindability: one-way -> rewindable]
> There are 5 empty subsets:
> {noformat}



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

Reply via email to