Description
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
/subquery/scalar/test_complex_correlated_subquery.test[_ignore]
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:
Attachments
Issue Links
- duplicates
-
IGNITE-15984 Calcite engine. Query plan can't be planned if correlated variable used in both filter and project
- Resolved
-
IGNITE-16040 Calcite. Unable to plan query with several correlated sub-queries in select list
- Resolved
- is part of
-
IGNITE-12248 Apache Calcite based query execution engine
- Open