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

[DV] Unsupported correlated subquery type (amazon athena)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • dv-future
    • None
    • Data Integration
    • None
    • % %

      Some kind of subqueries failed because of athena do not support them.
      I run the same queries against athena directly and I got the same error result : Unsupported correlated subquery type

      All queries have the same stacktrace.
      Examples of prepared values:
      [Prepared Values: [] SQL: SELECT g_0.intkey FROM bqt.smalla AS g_0 WHERE g_0.charvalue = (SELECT g_1.charvalue FROM bqt.smalla AS g_1 WHERE g_1.intkey = g_0.intkey)]
      [Prepared Values: [] SQL: SELECT g_0.intkey FROM bqt.smalla AS g_0 WHERE (SELECT g_1.longnum FROM bqt.smalla AS g_1 WHERE g_1.stringkey = g_0.stringkey) = 25]

      Stacktrace:

       org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 bqt: 100071 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0.intkey FROM bqt.smalla AS g_0 WHERE g_0.stringkey = (SELECT g_1.stringkey FROM bqt.smalla AS g_1 WHERE g_1.intnum = g_0.intnum)]
      	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: [] SQL: SELECT g_0.intkey FROM bqt.smalla AS g_0 WHERE g_0.stringkey = (SELECT g_1.stringkey FROM bqt.smalla AS g_1 WHERE g_1.intnum = g_0.intnum)]
      	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.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: [] SQL: SELECT g_0.intkey FROM bqt.smalla AS g_0 WHERE g_0.stringkey = (SELECT g_1.stringkey FROM bqt.smalla AS g_1 WHERE g_1.intnum = g_0.intnum)]
      	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.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	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. Unsupported correlated subquery type
      	at com.simba.athena.athena.api.AJClient.executeQuery(Unknown Source)
      	at com.simba.athena.athena.dataengine.AJQueryExecutor.execute(Unknown Source)
      	at com.simba.athena.jdbc.common.SPreparedStatement.executeWithParams(Unknown Source)
      	at com.simba.athena.jdbc.common.SPreparedStatement.executeQuery(Unknown Source)
      	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
      	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:402)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	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. Unsupported correlated subquery type
      	... 24 more
      

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

                Created:
                Updated:
                Resolved: