[ https://issues.apache.org/jira/browse/IGNITE-16040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov updated IGNITE-16040: -------------------------------------- Description: Currently the query like below can't be planned by calcite-based sql engine: {code:java} SELECT a+b*2, (a+b+c+d+e)/5, (SELECT count(*) FROM t1 AS x WHERE x.c>t1.c AND x.d<t1.d), (SELECT count(*) FROM t1 AS x WHERE x.b<t1.b), abs(b-c), a-b FROM t1 WHERE EXISTS(SELECT 1 FROM t1 AS x WHERE x.b<t1.b) AND c>d ORDER BY 6,5,4,1,3,2 {code} Need to figure it out how to fix this. was: Currently the query like below can't be planned calcite-based sql engine: {code:java} SELECT a+b*2, (a+b+c+d+e)/5, (SELECT count(*) FROM t1 AS x WHERE x.c>t1.c AND x.d<t1.d), (SELECT count(*) FROM t1 AS x WHERE x.b<t1.b), abs(b-c), a-b FROM t1 WHERE EXISTS(SELECT 1 FROM t1 AS x WHERE x.b<t1.b) AND c>d ORDER BY 6,5,4,1,3,2 {code} Need to figure it out how to fix this. > Calcite. Unable to plan query with several correlated sub-queries in select > list > -------------------------------------------------------------------------------- > > Key: IGNITE-16040 > URL: https://issues.apache.org/jira/browse/IGNITE-16040 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Konstantin Orlov > Assignee: Konstantin Orlov > Priority: Major > Labels: calcite, calcite2-required, calcite3-required > > Currently the query like below can't be planned by calcite-based sql engine: > {code:java} > SELECT a+b*2, > (a+b+c+d+e)/5, > (SELECT count(*) FROM t1 AS x WHERE x.c>t1.c AND x.d<t1.d), > (SELECT count(*) FROM t1 AS x WHERE x.b<t1.b), > abs(b-c), > a-b > FROM t1 > WHERE EXISTS(SELECT 1 FROM t1 AS x WHERE x.b<t1.b) > AND c>d > ORDER BY 6,5,4,1,3,2 > {code} > Need to figure it out how to fix this. -- This message was sent by Atlassian Jira (v8.20.1#820001)