Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13704

[DV] SYNTAX_ERROR: line 1:1: Incorrect number of parameters: expected 1 but found 0 (amazon athena)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • None
    • Data Integration
    • None
    • % %

      Two queries return exceptions because of syntax error.
      Queries:

      SELECT IntKey, timestampvalue FROM BQT1.SmallA WHERE timestampvalue = TIMESTAMPCREATE ({d'2000-01-01'},{t'00:00:03'})
      SELECT bqt2.smalla.intkey, g2.intkey, bqt2.smalla.bytenum FROM bqt2.smalla LEFT JOIN LATERAL (SELECT intkey FROM bqt2.mediuma WHERE bqt2.smalla.bytenum = bqt2.mediuma.bytenum) AS g2 ON true
      
      and their prepared values:
      [Prepared Values: [{ts '2000-01-01 00:00:03.0'}] SQL: SELECT g_0.intkey, g_0.timestampvalue FROM bqt.smalla AS g_0 WHERE g_0.timestampvalue = ?]
      [Prepared Values: [-128] SQL: SELECT g_0.intkey FROM bqt.mediuma AS g_0 WHERE g_0.bytenum = ?]
      

      Stacktrace:

      org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 bqt: 100071 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [-128] SQL: SELECT g_0.intkey FROM bqt.mediuma AS g_0 WHERE g_0.bytenum = ?]
      	at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:131)
      	at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:67)
      	at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:783)
      	at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:62)
      	at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:581)
      	at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:131)
      	at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:36)
      	at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:75)
      	at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:281)
      	at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:333)
      	at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:423)
      	at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:590)
      	at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1119)
      	at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:336)
      	at org.teiid.qe.bulkquery.engine.descriptors.BqtQueryDescriptor.execute(BqtQueryDescriptor.java:54)
      	at org.teiid.qe.bulkquery.engine.descriptors.BqtQueryDescriptor.execute(BqtQueryDescriptor.java:27)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at java.util.ArrayList.forEach(ArrayList.java:1257)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at java.util.ArrayList.forEach(ArrayList.java:1257)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at java.util.ArrayList.forEach(ArrayList.java:1257)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
      	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
      	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
      	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
      	at org.teiid.qe.bulkquery.surefire.BulkQuerySurefireProvider.invoke(BulkQuerySurefireProvider.java:84)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: org.teiid.core.TeiidProcessingException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 bqt: 100071 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [-128] SQL: SELECT g_0.intkey FROM bqt.mediuma AS g_0 WHERE g_0.bytenum = ?]
      	at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:397)
      	at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:157)
      	at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:401)
      	at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
      	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.hasNext(AbstractTupleSource.java:88)
      	at org.teiid.query.processor.relational.NestedTableJoinStrategy.process(NestedTableJoinStrategy.java:93)
      	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.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:139)
      	at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:147)
      	at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:110)
      	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:491)
      	at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:361)
      	at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
      	at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:284)
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:124)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$2.run(ThreadReuseExecutor.java:212)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.lang.Thread.run(Thread.java:834)
      Caused by: org.teiid.core.TeiidException: 100071 Remote org.teiid.translator.jdbc.JDBCExecutionException: 100071 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [-128] SQL: SELECT g_0.intkey FROM bqt.mediuma AS g_0 WHERE g_0.bytenum = ?]
      	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:127)
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:402)
      	at jdk.internal.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:566)
      	at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:228)
      	at com.sun.proxy.$Proxy125.execute(Unknown Source)
      	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:104)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:59)
      	... 6 more
      Caused by: java.sql.SQLException: Remote java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. SYNTAX_ERROR: line 1:1: Incorrect number of parameters: expected 1 but found 0
      	at com.simba.athena.athena.api.AJClient.executeQuery(Unknown Source)
      	at com.simba.athena.athena.dataengine.AJQueryExecutor.<init>(Unknown Source)
      	at com.simba.athena.athena.dataengine.AJDataEngine.prepare(Unknown Source)
      	at com.simba.athena.jdbc.common.SPreparedStatement.<init>(Unknown Source)
      	at com.simba.athena.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
      	at com.simba.athena.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
      	at com.simba.athena.jdbc.jdbc42.JDBC42ObjectFactory.createPreparedStatement(Unknown Source)
      	at com.simba.athena.athena.jdbc42.AJJDBC42ObjectFactory.createPreparedStatement(Unknown Source)
      	at com.simba.athena.jdbc.common.SConnection.prepareStatement(Unknown Source)
      	at com.simba.athena.jdbc.common.SConnection.prepareStatement(Unknown Source)
      	at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:311)
      	at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
      	at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:198)
      	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:117)
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:402)
      	at jdk.internal.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:566)
      	at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:228)
      	at com.sun.proxy.$Proxy125.execute(Unknown Source)
      	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:302)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:104)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:59)
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:124)
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$2.run(ThreadReuseExecutor.java:212)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      Caused by: org.teiid.core.TeiidRuntimeException: Remote com.simba.athena.support.exceptions.GeneralException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. SYNTAX_ERROR: line 1:1: Incorrect number of parameters: expected 1 but found 0
      	... 30 more
      

              rhn-engineering-rareddy Ramesh Reddy
              mmajerni@redhat.com Mario Majernik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: