Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5229

NoSuchElementException for inherent DELETE with no pk on source table

XMLWordPrintable

      DELETE fails when there's WHERE criteria on a column with type char.

      DELETE FROM SmallA WHERE CharValue IN ('2', '3')
      

      Error:

      14:04:41,627 ERROR [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue60) TEIID30019 Unexpected exception for request Bc4xXOpFO/lu.32: java.util.NoSuchElementException
      	at java.util.ArrayList$Itr.next(ArrayList.java:860) [rt.jar:1.8.0_151]
      	at org.teiid.query.rewriter.QueryRewriter.createPkCriteria(QueryRewriter.java:3104) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.createDeleteProcedure(QueryRewriter.java:3238) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.rewriteInherentDelete(QueryRewriter.java:3177) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.rewriteDelete(QueryRewriter.java:3130) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.rewriteCommand(QueryRewriter.java:238) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:168) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.query.rewriter.QueryRewriter.rewrite(QueryRewriter.java:172) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:426) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.Request.processRequest(Request.java:476) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-11.jar:8.12.11.6_4-redhat-64-11]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_151]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
      	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
      

      UPDATE works as expected.

              rhn-engineering-shawkins Steven Hawkins
              jstastny@redhat.com Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: