Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Docs Required, Release Notes Required
Description
The Calcite SQL engine can hang during query execution due to some Exception which not properly handled.
For example, try to execute query select reverse('NAME') from person. As result will be following exception and hangs execution.
java.lang.NullPointerException at org.apache.calcite.rex.RexBuilder.deriveReturnType(RexBuilder.java:283) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJson.toRex(RelJson.java:444) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader$RelInputImpl.getExpressionList(RelJsonReader.java:239) at org.apache.ignite.internal.processors.query.calcite.trait.TraitUtils$1.getExpressionList(TraitUtils.java:308) at org.apache.ignite.internal.processors.query.calcite.rel.ProjectableFilterableTableScan.<init>(ProjectableFilterableTableScan.java:85) at org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan.<init>(IgniteTableScan.java:46) at SC.apply(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJson$RelFactory.apply(RelJson.java:115) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRel(RelJsonReader.java:112) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRels(RelJsonReader.java:104) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.read(RelJsonReader.java:93) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.fromJson(RelJsonReader.java:78) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareFragment(ExecutionServiceImpl.java:528) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:847) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.lambda$init$1(ExecutionServiceImpl.java:440) at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:276) at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.lambda$onMessage$0(MessageServiceImpl.java:256) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [2021-02-24 17:04:40,816][ERROR][calciteQry-#265%calcite.AggregatesIntegrationTest1%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=CRITICAL_ERROR, err=java.lang.NullPointerException]] java.lang.NullPointerException at org.apache.calcite.rex.RexBuilder.deriveReturnType(RexBuilder.java:283) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJson.toRex(RelJson.java:444) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader$RelInputImpl.getExpressionList(RelJsonReader.java:239) at org.apache.ignite.internal.processors.query.calcite.trait.TraitUtils$1.getExpressionList(TraitUtils.java:308) at org.apache.ignite.internal.processors.query.calcite.rel.ProjectableFilterableTableScan.<init>(ProjectableFilterableTableScan.java:85) at org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan.<init>(IgniteTableScan.java:46) at SC.apply(Unknown Source) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJson$RelFactory.apply(RelJson.java:115) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRel(RelJsonReader.java:112) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRels(RelJsonReader.java:104) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.read(RelJsonReader.java:93) at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.fromJson(RelJsonReader.java:78) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareFragment(ExecutionServiceImpl.java:528) at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:847) at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.lambda$init$1(ExecutionServiceImpl.java:440) at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:276) at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.lambda$onMessage$0(MessageServiceImpl.java:256) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [2021-02-24 17:04:40,816][ERROR][calciteQry-#267%calcite.AggregatesIntegrationTest2%][IgniteTestResources] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], failureCtx=FailureContext [type=CRITICAL_ERROR, err=java.lang.NullPointerException]]
Attachments
Issue Links
- is part of
-
IGNITE-12248 Apache Calcite based query execution engine
- Open
- links to