[
https://issues.jboss.org/browse/TEIID-5686?page=com.atlassian.jira.plugin...
]
dalex dalex commented on TEIID-5686:
------------------------------------
[~shawkins] thx a lot for the quick fix, I checked these changes locally, it worked!
NPE in MergeJoinStrategy when using joins with a particular limit
value
-----------------------------------------------------------------------
Key: TEIID-5686
URL:
https://issues.jboss.org/browse/TEIID-5686
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 12.0
Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core
6.0.2.Final)
Reporter: dalex dalex
Assignee: Steven Hawkins
Priority: Major
Fix For: 12.2
When running the following query (IMPORTANT: you shouldn't use row limit):
{code:sql}
begin
declare integer i=0;
while (i < 2)
begin
select *
from "test_tables_pg.test_a" t0
JOIN "test_tables_pg.test_e" t1
ON true
JOIN "test_tables_pg.test_e" t2
ON true
JOIN views.v t3
on true
JOIN views.v t4
on true
limit 257 ;
i=i+1;
end
end ;;
{code}
teiid throws out the following NPE:
{code:noformat}
2019-03-13 13:50:28,582 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue233)
InwGU8fhfbja TEIID30019 Unexpected exception for request InwGU8fhfbja.22:
java.lang.NullPointerEx
ception
at
org.teiid.query.processor.relational.MergeJoinStrategy.compareToPrevious(MergeJoinStrategy.java:284)
at
org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:238)
at
org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:260)
at
org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at
org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:98)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at
org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at
org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
at
org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
at
org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
at
org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
at
org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:44)
at
org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:303)
at
org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
at
org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at
org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
at
org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
at
org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
at
org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
at
org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:113)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:199)
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)
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)