-
Bug
-
Resolution: Done
-
Major
-
15.0.1
-
None
-
-
Undefined
When running the sql script:
begin declare integer v_id = 5002; SELECT rsr.salesorderid, rsr.rowguid , variables.v_id FROM "adventureworks.salesorderdetail" rsr ORDER BY --rsr.salesorderid, variables.v_id; -- ok rsr.salesorderid = variables.v_id; -- java.lang.AssertionError end ;;
Teiid generates the following stacktrace with a java.lang.AssertionError:
2020-12-23 17:26:51,246 ERROR [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue31) 3JDnTSxK+dqM TEIID30019 Unexpected exception for request 3JDnTSxK+dqM.20: java.lang.AssertionError: org.teiid.query.sql.symbol.Reference VARIABLES.v_id at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:787) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:586) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:492) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:779) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:1030) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:777) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:737) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:374) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:272) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:173) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:220) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:1304) at org.jboss.teiid@15.0.1//org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:178) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.ProcedurePlan.registerRequest(ProcedurePlan.java:942) at org.jboss.teiid@15.0.1//org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:507) at org.jboss.teiid@15.0.1//org.teiid.query.processor.relational.AccessNode.openInternal(AccessNode.java:273) at org.jboss.teiid@15.0.1//org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:174) at org.jboss.teiid@15.0.1//org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:130) at org.jboss.teiid@15.0.1//org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:227) at org.jboss.teiid@15.0.1//org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:134) at org.jboss.teiid@15.0.1//org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:110) at org.jboss.teiid@15.0.1//org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65) at org.jboss.teiid@15.0.1//org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66) at org.jboss.teiid@15.0.1//org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80) at org.jboss.teiid@15.0.1//org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:88) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:625) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:65) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:402) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:295) at org.jboss.teiid@15.0.1//org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:267) at org.jboss.teiid@15.0.1//org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:147) at org.jboss.teiid@15.0.1//org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:110) at org.jboss.teiid@15.0.1//org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160) at org.jboss.teiid@15.0.1//org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:491) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:361) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:284) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:283) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:124) at org.jboss.teiid@15.0.1//org.teiid.dqp.internal.process.ThreadReuseExecutor$2.run(ThreadReuseExecutor.java:212) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)