6 Replies Latest reply: Feb 29, 2012 11:07 AM by Steven Hawkins RSS

    Exception while executing left join

    Ganesh Kumar Newbie

      Hi all,

       

      I am executing a query similar to the below using Teiid:

       

      select * from emp.persons as persons left join emp.orders as orders on persons.p_id=orders.p_id where persons.p_id=orders.p_id;

       

      This execution is resulting in the following exception:

       

      28 Feb 2012 14:05:28,374 IST ERROR [org.teiid.PROCESSOR] (Worker52_QueryProcessorQueue4016) Unexpected exception for request U6gyTHr/Okdy.0

      java.lang.ArrayIndexOutOfBoundsException: 4

            at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.createIndex(EnhancedSortMergeJoinStrategy.java:142)

            at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadRight(EnhancedSortMergeJoinStrategy.java:247)

            at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)

            at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279)

            at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:155)

            at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279)

            at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:176)

            at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:139)

            at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

            at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:147)

            at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:374)

            at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:287)

            at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

            at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)

            at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)

            at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)

            at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

            at java.lang.Thread.run(Thread.java:722)

       

      Can anyone tell me why I am getting this exception?

       

      Teiid version : 7.6

      JDK 1.7.0_02-b13

      OS - Windows 7

       

      Thanks,

      Ganesh