-
Bug
-
Resolution: Done
-
Blocker
-
9.3
-
None
Running the following query:
SELECT id FROM (SELECT d.id FROM ( SELECT 'l1' as domain ) dim_md_domains_to_load, table(CALL testcase.proc_web_avg_visit_duration_empty("domain" => domain)) x JOIN testcase.dim_md_date_ranges d ON true UNION SELECT id FROM testcase.dim_md_date_ranges ) z
when using the following procedure:
CREATE VIRTUAL PROCEDURE proc_web_avg_visit_duration_empty( domain string ) RETURNS (i integer) AS BEGIN select 1; END
leads to the following error message:
2017-07-19 19:57:12,608 ERROR [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue15) FOgTHY5kk50l TEIID30019 Unexpected exception for request FOgTHY5kk50l.1: org.teiid.core.TeiidCo mponentException: TEIID30328 Unable to evaluate dim_md_domains_to_load.domain: No value was available at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:514) at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:766) at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:726) at org.teiid.query.processor.proc.ProcedurePlan.evaluateExpression(ProcedurePlan.java:857) at org.teiid.query.processor.proc.ProcedurePlan.open(ProcedurePlan.java:225) at org.teiid.query.processor.relational.PlanExecutionNode.open(PlanExecutionNode.java:82) at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) at org.teiid.query.processor.relational.JoinStrategy.openLeft(JoinStrategy.java:95) at org.teiid.query.processor.relational.NestedTableJoinStrategy.openLeft(NestedTableJoinStrategy.java:74) at org.teiid.query.processor.relational.JoinNode.open(JoinNode.java:145) at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) at org.teiid.query.processor.relational.UnionAllNode.open(UnionAllNode.java:123) at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) at org.teiid.query.processor.relational.DupRemoveNode.open(DupRemoveNode.java:53) at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) at org.teiid.query.processor.relational.LimitNode.open(LimitNode.java:146) at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:136) at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:231) at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138) at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:477) at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:349) at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:275) at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282) at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
and when using the following procedure:
CREATE VIRTUAL PROCEDURE proc_web_avg_visit_duration_empty( domain string ) RETURNS (i integer) AS BEGIN END
leads to the following error message:
2017-07-19 19:51:09,898 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue6) W9VMA4B+d8Gd TEIID30019 Unexpected exception for request W9VMA4B+d8Gd.1: java.lang.NullPointerEx ception at org.teiid.query.processor.proc.Program.instructionsRequireTransaction(Program.java:307) at org.teiid.query.processor.proc.Program.requiresTransaction(Program.java:301) at org.teiid.query.processor.proc.ProcedurePlan.requiresTransaction(ProcedurePlan.java:881) at org.teiid.query.processor.relational.PlanExecutionNode.requiresTransaction(PlanExecutionNode.java:184) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:283) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:291) at org.teiid.query.processor.relational.RelationalPlan.requiresTransaction(RelationalPlan.java:269) at org.teiid.dqp.internal.process.Request.getTransactionContext(Request.java:374) at org.teiid.dqp.internal.process.Request.createProcessor(Request.java:350) at org.teiid.dqp.internal.process.Request.processRequest(Request.java:485) at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:657) at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:338) at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:275) at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282) at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)