[JBoss JIRA] (TEIID-4686) PrestoDB translator - ordering of joined tables fails
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4686?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4686:
------------------------------------
Thanks Juraj, I think we need wait Ramesh or Steven's comments.
> Isn't there way how to disable it only after JOIN?
I have no idea how translator control Order By in Join Query, and driver version also related.
> PrestoDB translator - ordering of joined tables fails
> -----------------------------------------------------
>
> Key: TEIID-4686
> URL: https://issues.jboss.org/browse/TEIID-4686
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Issuing query like \[1\] causes an exception in PrestoDB. This seems to be PrestoDB issue. I found similar issue \[2\], but that one should be fixed. I have created a new issue \[3\]. Removing one column from ORDER BY, query returns correct result.
> Not sure if we can do something about it without avoiding pushing JOIN.
> I suggest either to fix this (if simple enough) or add a note to the documentation.
> \[1\]
> {code:sql}
> SELECT a.intkey, b.intkey FROM BQT1.SmallA AS a INNER JOIN BQT1.SmallB AS b on a.intkey = b.intkey ORDER BY 1, 2
> {code}
> \[2\] https://github.com/prestodb/presto/issues/1621
> \[3\] https://github.com/prestodb/presto/issues/7010
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery type
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4687 at 1/16/17 5:28 AM:
-------------------------------------------------------------
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
In unit test code, the sql be translated with a limit 2, but the case description not has this kind of source query.
{code}
SELECT a.intKey, a.bytenum, (SELECT b.bytenum FROM smalla AS b WHERE cast(b.bytenum AS bigint) = a.longnum AND b.intKey = '10' LIMIT 2) AS longnum FROM smalla AS a
{code}
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
was (Author: kylin):
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
In unit test code, the sql be translated with a limit 2, but the case description not has this kind of source query.
{code}
SELECT a.intKey, a.bytenum, (SELECT b.bytenum FROM smalla AS b WHERE cast(b.bytenum AS bigint) = a.longnum LIMIT 2) FROM smalla AS a
{code}
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
> PrestoDB translator - unsupported corelated subquery type
> ---------------------------------------------------------
>
> Key: TEIID-4687
> URL: https://issues.jboss.org/browse/TEIID-4687
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Running query \[1\], PrestoDB throws exception (log \[2\]) for translated query.
> {code:sql|title=\[1\]}
> SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> {code}
> {code:plain|title=\[2\]}
> 15:51:58,928 DEBUG [org.teiid.TRANSPORT] (New I/O worker #2) processing message:MessageHolder: key=386 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 with state NEW
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Command has no cache hint and result set cache mode is not on.
> 15:51:58,931 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 executing SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> 15:51:58,936 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) ProcessTree for DEf6D1zaxo6u.14 AccessNode(1) output=[SmallA__1.IntKey, SmallA__1.StringKey, convert(SmallA__1.FloatNum, float), convert(SmallA__1.ByteNum, byte), (SELECT convert(g_0.ByteNum, byte) AS c_0 FROM Source.SmallA AS g_0 WHERE (convert(convert(g_0.ByteNum, byte), long) = SmallA__1.LongNum) AND (g_0.IntKey = 10)) AS longnum] SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@65d4dce6(DEf6D1zaxo6u)
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) after getOrCreateTransactionContext : DEf6D1zaxo6u NONE ID:NONE
> 15:51:58,939 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) Creating TupleBuffer: 19 [a.IntKey, a.StringKey, a.FloatNum, a.ByteNum, (SELECT b.ByteNum FROM BQT1.SmallA AS b WHERE (convert(b.ByteNum, long) = a.LongNum) AND (b.IntKey = 10) LIMIT 2) AS longnum] [class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Byte, class java.lang.Byte] batch size 1024 of type PROCESSOR
> 15:51:58,940 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Create State
> 15:51:58,941 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Blocking on source query DEf6D1zaxo6u.14.1.14
> 15:51:58,942 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Blocking on source request(s).
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 - processor blocked
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue48) Running task for parent thread Worker13_QueryProcessorQueue47
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Obtained execution
> 15:51:58,944 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Source-specific command: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0
> 15:51:59,443 WARN [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Connector worker process failed for atomic-request=DEf6D1zaxo6u.14.1.14: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,452 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Request Thread DEf6D1zaxo6u.14 with state PROCESSING
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Remove State
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Processing Close : SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed execution
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed connection
> 15:51:59,454 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) QueryProcessor: closing processor
> 15:51:59,454 WARN [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) TEIID30020 Processing exception for request DEf6D1zaxo6u.14 'TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]'. Originally TeiidProcessingException 'Unsupported correlated subquery type' NoApplyNodeLeftChecker.java:42.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Removing tuplesource for the request DEf6D1zaxo6u.14
> 15:51:59,460 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue49) Removing TupleBuffer: 19
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14 Finished Processing
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0] Sending error to client DEf6D1zaxo6u.14
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery type
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4687 at 1/16/17 5:28 AM:
-------------------------------------------------------------
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
In unit test code, the sql be translated with a limit 2, but the description section not has this kind of source query.
{code}
SELECT a.intKey, a.bytenum, (SELECT b.bytenum FROM smalla AS b WHERE cast(b.bytenum AS bigint) = a.longnum AND b.intKey = '10' LIMIT 2) AS longnum FROM smalla AS a
{code}
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
was (Author: kylin):
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
In unit test code, the sql be translated with a limit 2, but the case description not has this kind of source query.
{code}
SELECT a.intKey, a.bytenum, (SELECT b.bytenum FROM smalla AS b WHERE cast(b.bytenum AS bigint) = a.longnum AND b.intKey = '10' LIMIT 2) AS longnum FROM smalla AS a
{code}
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
> PrestoDB translator - unsupported corelated subquery type
> ---------------------------------------------------------
>
> Key: TEIID-4687
> URL: https://issues.jboss.org/browse/TEIID-4687
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Running query \[1\], PrestoDB throws exception (log \[2\]) for translated query.
> {code:sql|title=\[1\]}
> SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> {code}
> {code:plain|title=\[2\]}
> 15:51:58,928 DEBUG [org.teiid.TRANSPORT] (New I/O worker #2) processing message:MessageHolder: key=386 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 with state NEW
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Command has no cache hint and result set cache mode is not on.
> 15:51:58,931 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 executing SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> 15:51:58,936 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) ProcessTree for DEf6D1zaxo6u.14 AccessNode(1) output=[SmallA__1.IntKey, SmallA__1.StringKey, convert(SmallA__1.FloatNum, float), convert(SmallA__1.ByteNum, byte), (SELECT convert(g_0.ByteNum, byte) AS c_0 FROM Source.SmallA AS g_0 WHERE (convert(convert(g_0.ByteNum, byte), long) = SmallA__1.LongNum) AND (g_0.IntKey = 10)) AS longnum] SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@65d4dce6(DEf6D1zaxo6u)
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) after getOrCreateTransactionContext : DEf6D1zaxo6u NONE ID:NONE
> 15:51:58,939 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) Creating TupleBuffer: 19 [a.IntKey, a.StringKey, a.FloatNum, a.ByteNum, (SELECT b.ByteNum FROM BQT1.SmallA AS b WHERE (convert(b.ByteNum, long) = a.LongNum) AND (b.IntKey = 10) LIMIT 2) AS longnum] [class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Byte, class java.lang.Byte] batch size 1024 of type PROCESSOR
> 15:51:58,940 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Create State
> 15:51:58,941 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Blocking on source query DEf6D1zaxo6u.14.1.14
> 15:51:58,942 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Blocking on source request(s).
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 - processor blocked
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue48) Running task for parent thread Worker13_QueryProcessorQueue47
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Obtained execution
> 15:51:58,944 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Source-specific command: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0
> 15:51:59,443 WARN [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Connector worker process failed for atomic-request=DEf6D1zaxo6u.14.1.14: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,452 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Request Thread DEf6D1zaxo6u.14 with state PROCESSING
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Remove State
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Processing Close : SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed execution
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed connection
> 15:51:59,454 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) QueryProcessor: closing processor
> 15:51:59,454 WARN [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) TEIID30020 Processing exception for request DEf6D1zaxo6u.14 'TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]'. Originally TeiidProcessingException 'Unsupported correlated subquery type' NoApplyNodeLeftChecker.java:42.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Removing tuplesource for the request DEf6D1zaxo6u.14
> 15:51:59,460 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue49) Removing TupleBuffer: 19
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14 Finished Processing
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0] Sending error to client DEf6D1zaxo6u.14
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery type
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4687 at 1/16/17 5:23 AM:
-------------------------------------------------------------
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
In unit test code, the sql be translated with a limit 2, but the case description not has this kind of source query.
{code}
SELECT a.intKey, a.bytenum, (SELECT b.bytenum FROM smalla AS b WHERE cast(b.bytenum AS bigint) = a.longnum LIMIT 2) FROM smalla AS a
{code}
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
was (Author: kylin):
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
> PrestoDB translator - unsupported corelated subquery type
> ---------------------------------------------------------
>
> Key: TEIID-4687
> URL: https://issues.jboss.org/browse/TEIID-4687
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Running query \[1\], PrestoDB throws exception (log \[2\]) for translated query.
> {code:sql|title=\[1\]}
> SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> {code}
> {code:plain|title=\[2\]}
> 15:51:58,928 DEBUG [org.teiid.TRANSPORT] (New I/O worker #2) processing message:MessageHolder: key=386 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 with state NEW
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Command has no cache hint and result set cache mode is not on.
> 15:51:58,931 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 executing SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> 15:51:58,936 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) ProcessTree for DEf6D1zaxo6u.14 AccessNode(1) output=[SmallA__1.IntKey, SmallA__1.StringKey, convert(SmallA__1.FloatNum, float), convert(SmallA__1.ByteNum, byte), (SELECT convert(g_0.ByteNum, byte) AS c_0 FROM Source.SmallA AS g_0 WHERE (convert(convert(g_0.ByteNum, byte), long) = SmallA__1.LongNum) AND (g_0.IntKey = 10)) AS longnum] SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@65d4dce6(DEf6D1zaxo6u)
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) after getOrCreateTransactionContext : DEf6D1zaxo6u NONE ID:NONE
> 15:51:58,939 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) Creating TupleBuffer: 19 [a.IntKey, a.StringKey, a.FloatNum, a.ByteNum, (SELECT b.ByteNum FROM BQT1.SmallA AS b WHERE (convert(b.ByteNum, long) = a.LongNum) AND (b.IntKey = 10) LIMIT 2) AS longnum] [class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Byte, class java.lang.Byte] batch size 1024 of type PROCESSOR
> 15:51:58,940 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Create State
> 15:51:58,941 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Blocking on source query DEf6D1zaxo6u.14.1.14
> 15:51:58,942 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Blocking on source request(s).
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 - processor blocked
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue48) Running task for parent thread Worker13_QueryProcessorQueue47
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Obtained execution
> 15:51:58,944 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Source-specific command: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0
> 15:51:59,443 WARN [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Connector worker process failed for atomic-request=DEf6D1zaxo6u.14.1.14: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,452 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Request Thread DEf6D1zaxo6u.14 with state PROCESSING
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Remove State
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Processing Close : SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed execution
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed connection
> 15:51:59,454 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) QueryProcessor: closing processor
> 15:51:59,454 WARN [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) TEIID30020 Processing exception for request DEf6D1zaxo6u.14 'TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]'. Originally TeiidProcessingException 'Unsupported correlated subquery type' NoApplyNodeLeftChecker.java:42.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Removing tuplesource for the request DEf6D1zaxo6u.14
> 15:51:59,460 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue49) Removing TupleBuffer: 19
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14 Finished Processing
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0] Sending error to client DEf6D1zaxo6u.14
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery type
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4687:
------------------------------------
Steven, as per [1] seems teiid support Correlated subquery, is there some integration test or examples about Correlated subquery in other translator?
[1] https://teiid.gitbooks.io/documents/content/reference/Subqueries.html
> PrestoDB translator - unsupported corelated subquery type
> ---------------------------------------------------------
>
> Key: TEIID-4687
> URL: https://issues.jboss.org/browse/TEIID-4687
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Running query \[1\], PrestoDB throws exception (log \[2\]) for translated query.
> {code:sql|title=\[1\]}
> SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> {code}
> {code:plain|title=\[2\]}
> 15:51:58,928 DEBUG [org.teiid.TRANSPORT] (New I/O worker #2) processing message:MessageHolder: key=386 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 with state NEW
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Command has no cache hint and result set cache mode is not on.
> 15:51:58,931 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 executing SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> 15:51:58,936 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) ProcessTree for DEf6D1zaxo6u.14 AccessNode(1) output=[SmallA__1.IntKey, SmallA__1.StringKey, convert(SmallA__1.FloatNum, float), convert(SmallA__1.ByteNum, byte), (SELECT convert(g_0.ByteNum, byte) AS c_0 FROM Source.SmallA AS g_0 WHERE (convert(convert(g_0.ByteNum, byte), long) = SmallA__1.LongNum) AND (g_0.IntKey = 10)) AS longnum] SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@65d4dce6(DEf6D1zaxo6u)
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) after getOrCreateTransactionContext : DEf6D1zaxo6u NONE ID:NONE
> 15:51:58,939 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) Creating TupleBuffer: 19 [a.IntKey, a.StringKey, a.FloatNum, a.ByteNum, (SELECT b.ByteNum FROM BQT1.SmallA AS b WHERE (convert(b.ByteNum, long) = a.LongNum) AND (b.IntKey = 10) LIMIT 2) AS longnum] [class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Byte, class java.lang.Byte] batch size 1024 of type PROCESSOR
> 15:51:58,940 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Create State
> 15:51:58,941 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Blocking on source query DEf6D1zaxo6u.14.1.14
> 15:51:58,942 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Blocking on source request(s).
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 - processor blocked
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue48) Running task for parent thread Worker13_QueryProcessorQueue47
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Obtained execution
> 15:51:58,944 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Source-specific command: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0
> 15:51:59,443 WARN [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Connector worker process failed for atomic-request=DEf6D1zaxo6u.14.1.14: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,452 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Request Thread DEf6D1zaxo6u.14 with state PROCESSING
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Remove State
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Processing Close : SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed execution
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed connection
> 15:51:59,454 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) QueryProcessor: closing processor
> 15:51:59,454 WARN [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) TEIID30020 Processing exception for request DEf6D1zaxo6u.14 'TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]'. Originally TeiidProcessingException 'Unsupported correlated subquery type' NoApplyNodeLeftChecker.java:42.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Removing tuplesource for the request DEf6D1zaxo6u.14
> 15:51:59,460 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue49) Removing TupleBuffer: 19
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14 Finished Processing
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0] Sending error to client DEf6D1zaxo6u.14
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4686) PrestoDB translator - ordering of joined tables fails
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4686?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-4686:
-------------------------------------
The problem is not with ORDER BY in general. It happens only in combination with JOIN. Do we want to disable support for ORDER BY in general? Isn't there way how to disable it only after JOIN?
One more note. The correct condition in this case should be:
{code:java}
if(getVersion().compareTo(V_0_162) < 0){
...
}
{code}
> PrestoDB translator - ordering of joined tables fails
> -----------------------------------------------------
>
> Key: TEIID-4686
> URL: https://issues.jboss.org/browse/TEIID-4686
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Issuing query like \[1\] causes an exception in PrestoDB. This seems to be PrestoDB issue. I found similar issue \[2\], but that one should be fixed. I have created a new issue \[3\]. Removing one column from ORDER BY, query returns correct result.
> Not sure if we can do something about it without avoiding pushing JOIN.
> I suggest either to fix this (if simple enough) or add a note to the documentation.
> \[1\]
> {code:sql}
> SELECT a.intkey, b.intkey FROM BQT1.SmallA AS a INNER JOIN BQT1.SmallB AS b on a.intkey = b.intkey ORDER BY 1, 2
> {code}
> \[2\] https://github.com/prestodb/presto/issues/1621
> \[3\] https://github.com/prestodb/presto/issues/7010
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery type
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Kylin Soong updated TEIID-4687:
-------------------------------
Summary: PrestoDB translator - unsupported corelated subquery type (was: PrestoDB translator - unsupported corelated subquery)
> PrestoDB translator - unsupported corelated subquery type
> ---------------------------------------------------------
>
> Key: TEIID-4687
> URL: https://issues.jboss.org/browse/TEIID-4687
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Running query \[1\], PrestoDB throws exception (log \[2\]) for translated query.
> {code:sql|title=\[1\]}
> SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> {code}
> {code:plain|title=\[2\]}
> 15:51:58,928 DEBUG [org.teiid.TRANSPORT] (New I/O worker #2) processing message:MessageHolder: key=386 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 with state NEW
> 15:51:58,930 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Command has no cache hint and result set cache mode is not on.
> 15:51:58,931 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 executing SELECT intkey, stringkey, floatnum, bytenum, (SELECT bytenum FROM bqt1.smalla AS b WHERE (bytenum = a.longnum) AND (intkey = '10')) AS longnum FROM bqt1.smalla AS a
> 15:51:58,936 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) ProcessTree for DEf6D1zaxo6u.14 AccessNode(1) output=[SmallA__1.IntKey, SmallA__1.StringKey, convert(SmallA__1.FloatNum, float), convert(SmallA__1.ByteNum, byte), (SELECT convert(g_0.ByteNum, byte) AS c_0 FROM Source.SmallA AS g_0 WHERE (convert(convert(g_0.ByteNum, byte), long) = SmallA__1.LongNum) AND (g_0.IntKey = 10)) AS longnum] SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@65d4dce6(DEf6D1zaxo6u)
> 15:51:58,938 DEBUG [org.teiid.TXN_LOG] (Worker13_QueryProcessorQueue47) after getOrCreateTransactionContext : DEf6D1zaxo6u NONE ID:NONE
> 15:51:58,939 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) Creating TupleBuffer: 19 [a.IntKey, a.StringKey, a.FloatNum, a.ByteNum, (SELECT b.ByteNum FROM BQT1.SmallA AS b WHERE (convert(b.ByteNum, long) = a.LongNum) AND (b.IntKey = 10) LIMIT 2) AS longnum] [class java.lang.Integer, class java.lang.String, class java.lang.Float, class java.lang.Byte, class java.lang.Byte] batch size 1024 of type PROCESSOR
> 15:51:58,940 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Create State
> 15:51:58,941 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14.1.14 Blocking on source query DEf6D1zaxo6u.14.1.14
> 15:51:58,942 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue47) DEf6D1zaxo6u.14 Blocking on source request(s).
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue47) Request Thread DEf6D1zaxo6u.14 - processor blocked
> 15:51:58,942 DEBUG [org.teiid.PROCESSOR] (Worker14_QueryProcessorQueue48) Running task for parent thread Worker13_QueryProcessorQueue47
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Processing NEW request: SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:58,943 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) DEf6D1zaxo6u.14.1.14 Obtained execution
> 15:51:58,944 DEBUG [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Source-specific command: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0
> 15:51:59,443 WARN [org.teiid.CONNECTOR] (Worker14_QueryProcessorQueue48) Connector worker process failed for atomic-request=DEf6D1zaxo6u.14.1.14: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,452 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Request Thread DEf6D1zaxo6u.14 with state PROCESSING
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Remove State
> 15:51:59,452 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Processing Close : SELECT g_0.IntKey, g_0.StringKey, convert(g_0.FloatNum, float), convert(g_0.ByteNum, byte), (SELECT convert(g_1.ByteNum, byte) FROM Source.SmallA AS g_1 WHERE (convert(convert(g_1.ByteNum, byte), long) = g_0.LongNum) AND (g_1.IntKey = 10)) FROM Source.SmallA AS g_0
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed execution
> 15:51:59,453 DEBUG [org.teiid.CONNECTOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14.1.14 Closed connection
> 15:51:59,454 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) QueryProcessor: closing processor
> 15:51:59,454 WARN [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) TEIID30020 Processing exception for request DEf6D1zaxo6u.14 'TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]'. Originally TeiidProcessingException 'Unsupported correlated subquery type' NoApplyNodeLeftChecker.java:42.: org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: org.teiid.translator.jdbc.JDBCExecutionException: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_92]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 6 more
> Caused by: java.sql.SQLException: Query failed (#20170106_145159_04181_k4ss5): Unsupported correlated subquery type
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoResultSet.getColumns(PrestoResultSet.java:1747)
> at com.facebook.presto.jdbc.PrestoResultSet.<init>(PrestoResultSet.java:125)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:212)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119)
> ... 18 more
> Caused by: java.lang.IllegalArgumentException: Unsupported correlated subquery type
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker$1.visitApply(NoApplyNodeLeftChecker.java:42)
> at com.facebook.presto.sql.planner.plan.ApplyNode.accept(ApplyNode.java:142)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitProject(PlanVisitor.java:40)
> at com.facebook.presto.sql.planner.plan.ProjectNode.accept(ProjectNode.java:81)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitExchange(PlanVisitor.java:175)
> at com.facebook.presto.sql.planner.plan.ExchangeNode.accept(ExchangeNode.java:209)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:26)
> at com.facebook.presto.sql.planner.SimplePlanVisitor.visitPlan(SimplePlanVisitor.java:19)
> at com.facebook.presto.sql.planner.plan.PlanVisitor.visitOutput(PlanVisitor.java:50)
> at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:81)
> at com.facebook.presto.sql.planner.sanity.NoApplyNodeLeftChecker.validate(NoApplyNodeLeftChecker.java:33)
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
> at java.lang.Iterable.forEach(Iterable.java:75) [rt.jar:1.8.0_92]
> at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
> at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
> at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:292)
> at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:271)
> at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:229)
> at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
> ... 3 more
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) Removing tuplesource for the request DEf6D1zaxo6u.14
> 15:51:59,460 DEBUG [org.teiid.BUFFER_MGR] (Worker13_QueryProcessorQueue49) Removing TupleBuffer: 19
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) DEf6D1zaxo6u.14 Finished Processing
> 15:51:59,460 DEBUG [org.teiid.PROCESSOR] (Worker13_QueryProcessorQueue49) org.teiid.core.TeiidProcessingException: TEIID30504 Source: 65536 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0.intkey, g_0.stringkey, g_0.floatnum, g_0.bytenum, (SELECT g_1.bytenum FROM smalla AS g_1 WHERE cast(g_1.bytenum AS bigint) = g_0.longnum AND g_1.intkey = 10) FROM smalla AS g_0] Sending error to client DEf6D1zaxo6u.14
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4686) PrestoDB translator - ordering of joined tables fails
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4686?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4686:
------------------------------------
Do we need add a selection, if version > 0.162, set support OrderBy, simplely like
{code}
if(getVersion().compareTo(V_0_162 <= 0) {
setSupportsOrderBy(false);
}
{code}
The version can get from driver or set directly, I may need judge what kinds of version sting set in driver, this need spend me some time.
> PrestoDB translator - ordering of joined tables fails
> -----------------------------------------------------
>
> Key: TEIID-4686
> URL: https://issues.jboss.org/browse/TEIID-4686
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> Issuing query like \[1\] causes an exception in PrestoDB. This seems to be PrestoDB issue. I found similar issue \[2\], but that one should be fixed. I have created a new issue \[3\]. Removing one column from ORDER BY, query returns correct result.
> Not sure if we can do something about it without avoiding pushing JOIN.
> I suggest either to fix this (if simple enough) or add a note to the documentation.
> \[1\]
> {code:sql}
> SELECT a.intkey, b.intkey FROM BQT1.SmallA AS a INNER JOIN BQT1.SmallB AS b on a.intkey = b.intkey ORDER BY 1, 2
> {code}
> \[2\] https://github.com/prestodb/presto/issues/1621
> \[3\] https://github.com/prestodb/presto/issues/7010
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (TEIID-4684) PrestoDB translator - format* functions - invalid conversion to 'timestamp with timezone'
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4684?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4684:
------------------------------------
I have simple changed the "timestamp with timezone" as per original requested.
> PrestoDB translator - format* functions - invalid conversion to 'timestamp with timezone'
> -----------------------------------------------------------------------------------------
>
> Key: TEIID-4684
> URL: https://issues.jboss.org/browse/TEIID-4684
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.8.6_3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Fix For: 9.2.1
>
>
> When issuing query with formatdate or formattime, Teiid tries convert respective column to 'timestamp with timezone'. This conversion causes exception in PrestoDB. The proper conversion should be to 'timestamp'.
> {code:sql|title=Query}
> SELECT FORMATDATE(DateValue, 'MM-dd-yy') FROM BQT1.SmallA
> {code}
> {code:sql|title=Source command}
> SELECT format_datetime(cast(g_0.datevalue AS timestamp with timezone), 'MM-dd-yy') FROM smalla AS g_0
> {code}
> {code:plain|title=Exception}
> 14:41:32,061 WARN [org.teiid.CONNECTOR] (Worker30_QueryProcessorQueue143) Connector worker process failed for atomic-request=A7WqBzZhsyYM.50.0.34: org.teiid.translator.jdbc.JDBCExecutionException: 1 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT format_datetime(cast(g_0.datevalue AS timestamp with timezone), 'MM-dd-yy') FROM smalla AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364)
> at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) [:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy48.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
> Caused by: java.sql.SQLException: Query failed (#20170106_134131_04118_k4ss5): line 1:56: mismatched input 'with' expecting {')', 'ARRAY'}
> at com.facebook.presto.jdbc.PrestoResultSet.resultsException(PrestoResultSet.java:1799)
> at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:209)
> at com.facebook.presto.jdbc.PrestoStatement.executeQuery(PrestoStatement.java:69)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 17 more
> Caused by: com.facebook.presto.sql.parser.ParsingException: line 1:56: mismatched input 'with' expecting {')', 'ARRAY'}
> at com.facebook.presto.sql.parser.SqlParser$1.syntaxError(SqlParser.java:45)
> at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:65)
> at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:566)
> at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:325)
> at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:148)
> at com.facebook.presto.sql.parser.SqlBaseParser.type(SqlBaseParser.java:8691)
> at com.facebook.presto.sql.parser.SqlBaseParser.primaryExpression(SqlBaseParser.java:7817)
> at com.facebook.presto.sql.parser.SqlBaseParser.valueExpression(SqlBaseParser.java:6677)
> at com.facebook.presto.sql.parser.SqlBaseParser.predicated(SqlBaseParser.java:5955)
> at com.facebook.presto.sql.parser.SqlBaseParser.booleanExpression(SqlBaseParser.java:5858)
> at com.facebook.presto.sql.parser.SqlBaseParser.expression(SqlBaseParser.java:5613)
> at com.facebook.presto.sql.parser.SqlBaseParser.primaryExpression(SqlBaseParser.java:7613)
> at com.facebook.presto.sql.parser.SqlBaseParser.valueExpression(SqlBaseParser.java:6677)
> at com.facebook.presto.sql.parser.SqlBaseParser.predicated(SqlBaseParser.java:5955)
> at com.facebook.presto.sql.parser.SqlBaseParser.booleanExpression(SqlBaseParser.java:5858)
> at com.facebook.presto.sql.parser.SqlBaseParser.expression(SqlBaseParser.java:5613)
> at com.facebook.presto.sql.parser.SqlBaseParser.selectItem(SqlBaseParser.java:4706)
> at com.facebook.presto.sql.parser.SqlBaseParser.querySpecification(SqlBaseParser.java:3718)
> at com.facebook.presto.sql.parser.SqlBaseParser.queryPrimary(SqlBaseParser.java:3494)
> at com.facebook.presto.sql.parser.SqlBaseParser.queryTerm(SqlBaseParser.java:3306)
> at com.facebook.presto.sql.parser.SqlBaseParser.queryNoWith(SqlBaseParser.java:3162)
> at com.facebook.presto.sql.parser.SqlBaseParser.query(SqlBaseParser.java:2634)
> at com.facebook.presto.sql.parser.SqlBaseParser.statement(SqlBaseParser.java:1294)
> at com.facebook.presto.sql.parser.SqlBaseParser.singleStatement(SqlBaseParser.java:231)
> at com.facebook.presto.sql.parser.SqlParser.invokeParser(SqlParser.java:92)
> at com.facebook.presto.sql.parser.SqlParser.createStatement(SqlParser.java:65)
> at com.facebook.presto.execution.SqlQueryManager.createQuery(SqlQueryManager.java:289)
> at com.facebook.presto.server.StatementResource$Query.<init>(StatementResource.java:309)
> at com.facebook.presto.server.StatementResource.createQuery(StatementResource.java:172)
> at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source) [:1.8.0_92]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
> at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
> at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
> at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
> at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
> at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
> at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
> at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
> at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
> at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
> at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
> at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
> at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
> at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
> at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
> at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
> at io.airlift.http.server.TraceTokenFilter.doFilter(TraceTokenFilter.java:63)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
> at io.airlift.http.server.TimingFilter.doFilter(TimingFilter.java:52)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:395)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1182)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
> at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.server.Server.handle(Server.java:523)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> ... 1 more
> Caused by: org.antlr.v4.runtime.InputMismatchException
> at org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:268)
> at com.facebook.presto.sql.parser.SqlBaseParser.type(SqlBaseParser.java:8666)
> ... 77 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months