[ https://issues.apache.org/jira/browse/IGNITE-22866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Iurii Gerzhedovich updated IGNITE-22866: ---------------------------------------- Description: *Description:* Need to support recursive queries. The query {code:java} WITH RECURSIVE t(n) AS (SELECT 1 UNION ALL SELECT n + 1 FROM t WHERE n < 100) SELECT sum(n) FROM t; {code} should return {code:java} 5050 {code} currently returns error {noformat} org.apache.ignite.sql.SqlException: IGN-CMN-65535 TraceId:c2961dbf-64fd-4806-a2d9-20368f8454e5 There are not enough rules to produce a node with desired properties: convention=IGNITE, distr=single, sort=[]. Missing conversions are LogicalRepeatUnion[convention: NONE -> IGNITE, distr: any -> single], LogicalRepeatUnion[convention: NONE -> IGNITE, distr: any -> random] There are 2 empty subsets: Empty subset 0: rel#92:RelSubset#6.IGNITE.single.[], the relevant part of the original plan is as follows 87:LogicalRepeatUnion(all=[true]) 78:LogicalTableSpool(subset=[rel#79:RelSubset#1.NONE.any.[0]], readType=[LAZY], writeType=[LAZY], table=[[T]]) 1:LogicalValues(subset=[rel#77:RelSubset#0.NONE.any.[0]], tuples=[[{ 1 }]]) 85:LogicalTableSpool(subset=[rel#86:RelSubset#5.NONE.any.[]], readType=[LAZY], writeType=[LAZY], table=[[T]]) 83:LogicalProject(subset=[rel#84:RelSubset#4.NONE.any.[]], EXPR$0=[+($0, 1)]) 81:LogicalFilter(subset=[rel#82:RelSubset#3.NONE.any.[]], condition=[<($0, 100)]) 2:LogicalTableScan(subset=[rel#80:RelSubset#2.NONE.any.[]], table=[[T]]) ... (part of the debug error output was cut off) {noformat} Let's consider the ticket to make PoC to support RECURSIVE CTE queries. was: *Description:* Need to support recursive queries. The query {code:java} WITH RECURSIVE t(n) AS (SELECT 1 UNION ALL SELECT n + 1 FROM t WHERE n < 100) SELECT sum(n) FROM t; {code} should return {code:java} 5050 {code} currently returns error {noformat} org.apache.ignite.sql.SqlException: IGN-CMN-65535 TraceId:c2961dbf-64fd-4806-a2d9-20368f8454e5 There are not enough rules to produce a node with desired properties: convention=IGNITE, distr=single, sort=[]. Missing conversions are LogicalRepeatUnion[convention: NONE -> IGNITE, distr: any -> single], LogicalRepeatUnion[convention: NONE -> IGNITE, distr: any -> random] There are 2 empty subsets: Empty subset 0: rel#92:RelSubset#6.IGNITE.single.[], the relevant part of the original plan is as follows 87:LogicalRepeatUnion(all=[true]) 78:LogicalTableSpool(subset=[rel#79:RelSubset#1.NONE.any.[0]], readType=[LAZY], writeType=[LAZY], table=[[T]]) 1:LogicalValues(subset=[rel#77:RelSubset#0.NONE.any.[0]], tuples=[[{ 1 }]]) 85:LogicalTableSpool(subset=[rel#86:RelSubset#5.NONE.any.[]], readType=[LAZY], writeType=[LAZY], table=[[T]]) 83:LogicalProject(subset=[rel#84:RelSubset#4.NONE.any.[]], EXPR$0=[+($0, 1)]) 81:LogicalFilter(subset=[rel#82:RelSubset#3.NONE.any.[]], condition=[<($0, 100)]) 2:LogicalTableScan(subset=[rel#80:RelSubset#2.NONE.any.[]], table=[[T]]) ... (part of the debug error output was cut off) {noformat} Let's consider the ticket to make PoC to support of RECURSIVE CTE queries. > Support WITH RECURSIVE ... AS > ----------------------------- > > Key: IGNITE-22866 > URL: https://issues.apache.org/jira/browse/IGNITE-22866 > Project: Ignite > Issue Type: Improvement > Components: general, sql > Affects Versions: 3.0 > Reporter: Igor > Priority: Major > Labels: ignite-3 > > *Description:* > Need to support recursive queries. > The query > {code:java} > WITH RECURSIVE t(n) AS (SELECT 1 UNION ALL SELECT n + 1 FROM t WHERE n < 100) > SELECT sum(n) FROM t; {code} > should return > {code:java} > 5050 {code} > currently returns error > {noformat} > org.apache.ignite.sql.SqlException: IGN-CMN-65535 > TraceId:c2961dbf-64fd-4806-a2d9-20368f8454e5 There are not enough rules to > produce a node with desired properties: convention=IGNITE, distr=single, > sort=[]. > Missing conversions are LogicalRepeatUnion[convention: NONE -> IGNITE, distr: > any -> single], LogicalRepeatUnion[convention: NONE -> IGNITE, distr: any -> > random] > There are 2 empty subsets: > Empty subset 0: rel#92:RelSubset#6.IGNITE.single.[], the relevant part of the > original plan is as follows > 87:LogicalRepeatUnion(all=[true]) > 78:LogicalTableSpool(subset=[rel#79:RelSubset#1.NONE.any.[0]], > readType=[LAZY], writeType=[LAZY], table=[[T]]) > 1:LogicalValues(subset=[rel#77:RelSubset#0.NONE.any.[0]], tuples=[[{ 1 > }]]) > 85:LogicalTableSpool(subset=[rel#86:RelSubset#5.NONE.any.[]], > readType=[LAZY], writeType=[LAZY], table=[[T]]) > 83:LogicalProject(subset=[rel#84:RelSubset#4.NONE.any.[]], EXPR$0=[+($0, > 1)]) > 81:LogicalFilter(subset=[rel#82:RelSubset#3.NONE.any.[]], > condition=[<($0, 100)]) > 2:LogicalTableScan(subset=[rel#80:RelSubset#2.NONE.any.[]], > table=[[T]]) > ... > (part of the debug error output was cut off) > {noformat} > Let's consider the ticket to make PoC to support RECURSIVE CTE queries. -- This message was sent by Atlassian Jira (v8.20.10#820010)