[ https://issues.apache.org/jira/browse/IGNITE-24741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Korotkov updated IGNITE-24741: ------------------------------------- Description: h1. DistributedJoins=true Work on scales (0.01, 0.1, 1.0) h1. DistributedJoins=false Work on scale=0.1 and scale=1.0. But produce error on scale=0.01 during planning: There are not enough rules to produce a node with desired properties: convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, rewindability=one-way, correlation=uncorrelated. Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1]] {noformat} [2025-03-10T15:39:54,846][ERROR][main][] Test failed [test=TpchTest#testQ[Query engine=calcite], duration=37475] org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to plan query at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:117) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) ~[classes/:?] at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) ~[?:?] at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) ~[classes/:?] at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.exec(TpchTest.java:89) ~[test-classes/:?] at org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.testQ(TpchTest.java:79) ~[test-classes/:?] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ~[junit-4.12.jar:4.12] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) ~[junit-4.12.jar:4.12] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) ~[junit-4.12.jar:4.12] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) ~[junit-4.12.jar:4.12] at org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2507) ~[test-classes/:?] at java.base/java.lang.Thread.run(Thread.java:829) ~[?:?] Suppressed: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There are not enough rules to produce a node with desired properties: convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, rewindability=one-way, correlation=uncorrelated. Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1]] There are 2 empty subsets: Empty subset 0: rel#1956:RelSubset#4.IGNITE.[6, 1].any.one-way.uncorrelated, the relevant part of the original plan is as follows 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], condition=[=($0, $3)], joinType=[inner]) 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) Empty subset 1: rel#1961:RelSubset#4.IGNITE.[6, 1].single.one-way.uncorrelated, the relevant part of the original plan is as follows 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], condition=[=($0, $3)], joinType=[inner]) 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) {noformat} was: Work on scale=0.1 and scale=1.0 But produce error on scale=0.01 during planning: There are not enough rules to produce a node with desired properties: convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, rewindability=one-way, correlation=uncorrelated. Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1]] {noformat} [2025-03-10T15:39:54,846][ERROR][main][] Test failed [test=TpchTest#testQ[Query engine=calcite], duration=37475] org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to plan query at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:117) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) ~[classes/:?] at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) ~[?:?] at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) ~[classes/:?] at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) ~[classes/:?] at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) ~[classes/:?] at org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.exec(TpchTest.java:89) ~[test-classes/:?] at org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.testQ(TpchTest.java:79) ~[test-classes/:?] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) ~[junit-4.12.jar:4.12] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) ~[junit-4.12.jar:4.12] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) ~[junit-4.12.jar:4.12] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) ~[junit-4.12.jar:4.12] at org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2507) ~[test-classes/:?] at java.base/java.lang.Thread.run(Thread.java:829) ~[?:?] Suppressed: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: There are not enough rules to produce a node with desired properties: convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, rewindability=one-way, correlation=uncorrelated. Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: [] -> [6, 1]] There are 2 empty subsets: Empty subset 0: rel#1956:RelSubset#4.IGNITE.[6, 1].any.one-way.uncorrelated, the relevant part of the original plan is as follows 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], condition=[=($0, $3)], joinType=[inner]) 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) Empty subset 1: rel#1961:RelSubset#4.IGNITE.[6, 1].single.one-way.uncorrelated, the relevant part of the original plan is as follows 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], condition=[=($0, $3)], joinType=[inner]) 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) {noformat} > Calcite. TPC-H query #5: failed to plan query > --------------------------------------------- > > Key: IGNITE-24741 > URL: https://issues.apache.org/jira/browse/IGNITE-24741 > Project: Ignite > Issue Type: Bug > Reporter: Sergey Korotkov > Priority: Major > > h1. DistributedJoins=true > Work on scales (0.01, 0.1, 1.0) > h1. DistributedJoins=false > Work on scale=0.1 and scale=1.0. But produce error on scale=0.01 during > planning: > There are not enough rules to produce a node with desired properties: > convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, > rewindability=one-way, correlation=uncorrelated. > Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> > [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: > [] -> [6, 1]] > {noformat} > [2025-03-10T15:39:54,846][ERROR][main][] Test failed > [test=TpchTest#testQ[Query engine=calcite], duration=37475] > org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to > plan query > at > org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:117) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) > ~[classes/:?] > at > java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) > ~[?:?] > at > org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) > ~[classes/:?] > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) > ~[classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.exec(TpchTest.java:89) > ~[test-classes/:?] > at > org.apache.ignite.internal.processors.query.calcite.integration.tpch.TpchTest.testQ(TpchTest.java:79) > ~[test-classes/:?] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) ~[?:?] > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > ~[junit-4.12.jar:4.12] > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > ~[junit-4.12.jar:4.12] > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > ~[junit-4.12.jar:4.12] > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > ~[junit-4.12.jar:4.12] > at > org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2507) > ~[test-classes/:?] > at java.base/java.lang.Thread.run(Thread.java:829) ~[?:?] > Suppressed: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: > There are not enough rules to produce a node with desired properties: > convention=IGNITE, sort=[1 DESC-nulls-last], distr=single, > rewindability=one-way, correlation=uncorrelated. > Missing conversions are LogicalJoin[convention: NONE -> IGNITE, sort: [] -> > [6, 1], distr: any -> single], LogicalJoin[convention: NONE -> IGNITE, sort: > [] -> [6, 1]] > There are 2 empty subsets: > Empty subset 0: rel#1956:RelSubset#4.IGNITE.[6, 1].any.one-way.uncorrelated, > the relevant part of the original plan is as follows > 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) > > 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], > condition=[=($0, $3)], joinType=[inner]) > > 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) > > 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, > +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) > > 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) > Empty subset 1: rel#1961:RelSubset#4.IGNITE.[6, > 1].single.one-way.uncorrelated, the relevant part of the original plan is as > follows > 236:LogicalJoin(condition=[=($5, $2)], joinType=[inner]) > > 233:LogicalJoin(subset=[rel#234:RelSubset#2.NONE.[].any.one-way.uncorrelated], > condition=[=($0, $3)], joinType=[inner]) > > 189:IgniteLogicalTableScan(subset=[rel#231:RelSubset#0.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, CUSTOMER]], requiredColumns=[{2, 5}]) > > 196:IgniteLogicalTableScan(subset=[rel#232:RelSubset#1.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, ORDERS]], filters=[AND(>=($t2, 1994-01-01), <($t2, > +(1994-01-01, *(12:INTERVAL YEAR, 1))))], requiredColumns=[{2, 3, 6}]) > > 203:IgniteLogicalTableScan(subset=[rel#235:RelSubset#3.NONE.[].any.one-way.uncorrelated], > table=[[PUBLIC, LINEITEM]], requiredColumns=[{2, 4, 7, 8}]) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)