[ https://issues.apache.org/jira/browse/IGNITE-24741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Korotkov updated IGNITE-24741: ------------------------------------- Description: Sometimes produce error during planning in the attached test. {noformat} 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} Sometimes hang {noformat} "org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold-jmh-worker-1" #22 daemon prio=5 os_prio=0 cpu=563001.94ms elapsed=570.01s allocated=378G defined_classes=115 93 tid=0x00007ad05d7a4000 nid=0x49b7e runnable [0x00007ad0116fa000] java.lang.Thread.State: RUNNABLE at org.apache.calcite.plan.RelTraitSet.satisfies(RelTraitSet.java:496) at org.apache.calcite.plan.volcano.Dumpers.lambda$dumpGraphviz$2(Dumpers.java:183) at org.apache.calcite.plan.volcano.Dumpers$$Lambda$2624/0x0000000840ce7c40.lessThan(Unknown Source) at org.apache.calcite.util.PartiallyOrderedSet.findParentsChildren(PartiallyOrderedSet.java:340) at org.apache.calcite.util.PartiallyOrderedSet.findParents(PartiallyOrderedSet.java:315) at org.apache.calcite.util.PartiallyOrderedSet.add(PartiallyOrderedSet.java:233) at org.apache.calcite.plan.volcano.Dumpers.dumpGraphviz(Dumpers.java:239) at org.apache.calcite.plan.volcano.VolcanoPlanner.dump(VolcanoPlanner.java:869) at org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:715) at org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:391) at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:534) at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:328) at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.transform(IgnitePlanner.java:381) at org.apache.ignite.internal.processors.query.calcite.prepare.PlannerHelper.optimize(PlannerHelper.java:109) at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareQuery(PrepareServiceImpl.java:168) at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:94) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$2039/0x00000008409d1440.get(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl$$Lambda$2040/0x00000008409d1840.apply(Unknown Source) at java.util.concurrent.ConcurrentMap.computeIfAbsent(java.base@11.0.26/ConcurrentMap.java:330) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$1996/0x000000084094f040.apply(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) at org.apache.ignite.internal.processors.query.GridQueryProcessor$$Lambda$1990/0x000000084094b040.apply(Unknown Source) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.sql(TpchBenchmark.java:259) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold(TpchBenchmark.java:171) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_ss_jmhStub(TpchBenchmark_cold_jmhTest.java:416) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_SingleShotTime(TpchBenchmark_cold_jmhTest.java:371) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.26/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.26/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.26/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@11.0.26/Method.java:566) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:475) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:458) at java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.26/Executors.java:515) at java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.26/ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.26/ThreadPoolExecutor.java:628) at java.lang.Thread.run(java.base@11.0.26/Thread.java:829) {noformat} was: {color:red}WIP{color} 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} Sometimes hang {noformat} "org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold-jmh-worker-1" #22 daemon prio=5 os_prio=0 cpu=563001.94ms elapsed=570.01s allocated=378G defined_classes=115 93 tid=0x00007ad05d7a4000 nid=0x49b7e runnable [0x00007ad0116fa000] java.lang.Thread.State: RUNNABLE at org.apache.calcite.plan.RelTraitSet.satisfies(RelTraitSet.java:496) at org.apache.calcite.plan.volcano.Dumpers.lambda$dumpGraphviz$2(Dumpers.java:183) at org.apache.calcite.plan.volcano.Dumpers$$Lambda$2624/0x0000000840ce7c40.lessThan(Unknown Source) at org.apache.calcite.util.PartiallyOrderedSet.findParentsChildren(PartiallyOrderedSet.java:340) at org.apache.calcite.util.PartiallyOrderedSet.findParents(PartiallyOrderedSet.java:315) at org.apache.calcite.util.PartiallyOrderedSet.add(PartiallyOrderedSet.java:233) at org.apache.calcite.plan.volcano.Dumpers.dumpGraphviz(Dumpers.java:239) at org.apache.calcite.plan.volcano.VolcanoPlanner.dump(VolcanoPlanner.java:869) at org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:715) at org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:391) at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:534) at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:328) at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.transform(IgnitePlanner.java:381) at org.apache.ignite.internal.processors.query.calcite.prepare.PlannerHelper.optimize(PlannerHelper.java:109) at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareQuery(PrepareServiceImpl.java:168) at org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:94) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$2039/0x00000008409d1440.get(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl$$Lambda$2040/0x00000008409d1840.apply(Unknown Source) at java.util.concurrent.ConcurrentMap.computeIfAbsent(java.base@11.0.26/ConcurrentMap.java:330) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$1996/0x000000084094f040.apply(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) at org.apache.ignite.internal.processors.query.GridQueryProcessor$$Lambda$1990/0x000000084094b040.apply(Unknown Source) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.sql(TpchBenchmark.java:259) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold(TpchBenchmark.java:171) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_ss_jmhStub(TpchBenchmark_cold_jmhTest.java:416) at org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_SingleShotTime(TpchBenchmark_cold_jmhTest.java:371) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.26/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.26/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.26/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@11.0.26/Method.java:566) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:475) at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:458) at java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.26/Executors.java:515) at java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.26/ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.26/ThreadPoolExecutor.java:628) at java.lang.Thread.run(java.base@11.0.26/Thread.java:829) {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 > Labels: ise, tpch > > Sometimes produce error during planning in the attached test. > {noformat} > 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} > Sometimes hang > {noformat} > "org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold-jmh-worker-1" > #22 daemon prio=5 os_prio=0 cpu=563001.94ms elapsed=570.01s allocated=378G > defined_classes=115 > 93 tid=0x00007ad05d7a4000 nid=0x49b7e runnable [0x00007ad0116fa000] > java.lang.Thread.State: RUNNABLE > at org.apache.calcite.plan.RelTraitSet.satisfies(RelTraitSet.java:496) > at > org.apache.calcite.plan.volcano.Dumpers.lambda$dumpGraphviz$2(Dumpers.java:183) > at > org.apache.calcite.plan.volcano.Dumpers$$Lambda$2624/0x0000000840ce7c40.lessThan(Unknown > Source) > at > org.apache.calcite.util.PartiallyOrderedSet.findParentsChildren(PartiallyOrderedSet.java:340) > at > org.apache.calcite.util.PartiallyOrderedSet.findParents(PartiallyOrderedSet.java:315) > at > org.apache.calcite.util.PartiallyOrderedSet.add(PartiallyOrderedSet.java:233) > at > org.apache.calcite.plan.volcano.Dumpers.dumpGraphviz(Dumpers.java:239) > at > org.apache.calcite.plan.volcano.VolcanoPlanner.dump(VolcanoPlanner.java:869) > at > org.apache.calcite.plan.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:715) > at > org.apache.calcite.plan.volcano.RelSubset.buildCheapestPlan(RelSubset.java:391) > at > org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:534) > at > org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:328) > at > org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.transform(IgnitePlanner.java:381) > at > org.apache.ignite.internal.processors.query.calcite.prepare.PlannerHelper.optimize(PlannerHelper.java:109) > at > org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareQuery(PrepareServiceImpl.java:168) > at > org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareSingle(PrepareServiceImpl.java:94) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$5(CalciteQueryProcessor.java:553) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$2039/0x00000008409d1440.get(Unknown > Source) > at > org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.lambda$queryPlan$0(QueryPlanCacheImpl.java:70) > at > org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl$$Lambda$2040/0x00000008409d1840.apply(Unknown > Source) > at > java.util.concurrent.ConcurrentMap.computeIfAbsent(java.base@11.0.26/ConcurrentMap.java:330) > at > org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:70) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.lambda$parseAndProcessQuery$6(CalciteQueryProcessor.java:550) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor$$Lambda$1996/0x000000084094f040.apply(Unknown > Source) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.processQuery(CalciteQueryProcessor.java:701) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.parseAndProcessQuery(CalciteQueryProcessor.java:547) > at > org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:420) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3119) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:3075) > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3861) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:3152) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$$Lambda$1990/0x000000084094b040.apply(Unknown > Source) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:3289) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:3071) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2995) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2968) > at > org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.sql(TpchBenchmark.java:259) > at > org.apache.ignite.internal.benchmarks.jmh.sql.tpch.TpchBenchmark.cold(TpchBenchmark.java:171) > at > org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_ss_jmhStub(TpchBenchmark_cold_jmhTest.java:416) > at > org.apache.ignite.internal.benchmarks.jmh.sql.tpch.jmh_generated.TpchBenchmark_cold_jmhTest.cold_SingleShotTime(TpchBenchmark_cold_jmhTest.java:371) > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.26/Native > Method) > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.26/NativeMethodAccessorImpl.java:62) > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.26/DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(java.base@11.0.26/Method.java:566) > at > org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:475) > at > org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:458) > at > java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) > at > java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.26/Executors.java:515) > at > java.util.concurrent.FutureTask.run(java.base@11.0.26/FutureTask.java:264) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.26/ThreadPoolExecutor.java:1128) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.26/ThreadPoolExecutor.java:628) > at java.lang.Thread.run(java.base@11.0.26/Thread.java:829) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)