[JBoss JIRA] (TEIID-4687) PrestoDB translator - unsupported corelated subquery
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4687?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4687.
-----------------------------------
Resolution: Done
Merged the pull request.
> PrestoDB translator - unsupported corelated subquery
> ----------------------------------------------------
>
> 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
>
>
> 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, 8 months
[JBoss JIRA] (TEIID-3952) Update to updatable internal materialized view should update the materialized view as well as the database
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3952?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3952:
---------------------------------------
Another wrinkle in this is that we'll need to consider the current materialization status. If the update happens when the materialization is invalid, we should probably just ignore the write through effect. Also to do this in a straight-forward manner for internal materialization, we'll need to open up the temp table logic to access global tables for updates - not just select.
> Update to updatable internal materialized view should update the materialized view as well as the database
> ----------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3952
> URL: https://issues.jboss.org/browse/TEIID-3952
> Project: Teiid
> Issue Type: Enhancement
> Components: VDB
> Affects Versions: 8.7
> Environment: Red Hat JBoss Data Virtualization 6.2 based on Teiid 8.7.x
> Reporter: Andy Yuen
> Assignee: Steven Hawkins
> Labels: jboss
> Fix For: 9.2
>
>
> Updating an updatable internal materized view updates the database but not the materialized view at present. The requested enhancement is that they, both, should be updated.
> Setup
> Client - SquirrelSQL to access JDV
> JDV 6.2 - with an updatable nternal materialized view of one table from the data source
> Data Source - just one data source: MySQL
> I can see from the console that the target table/view has been materialized
> Then I did the following:
> 1) select a row from the materialized table
> 2) update a field in a row in the materialized view
> 3) select that row (value unchanged ie, same as int 1) - tried multiple times
> 4) issue EXEC SYSADMIN.refreshMatViewRow(...) using primary key for the row that has been changed
> 5) select that row (value unchanged) - now I can see the changed data
> This behaviour is counter-intuitive because I was expecting that since it is an updatable materialized view, my change will write through the materialized view ie, change both the materialized view as well as the database. But in this case, it changed the database and not the materialized view?
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4705) correct the nvl pushdown for the impala translator
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4705?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4705:
-------------------------------------
[~ejlp12] See the confusing part is, you mention CDH as the system, that is Clodera's distribution, which is recommend to be used with Impala JDBC Driver and impala translator. When your system is Open Source Apache Hive or Horton Works Distribution then it is recommended to use the Hive JDBC driver and Hive translator in Teiid. You seem to be using both interchangeably. The exception is logged against impala, but logs indicate behavior of "hive" translator. The impala translator's nvl(x, y) function is converted to isnull (x, y), where as hive translator converts nvl(x,y) to coalesce(x, y).
So, the queries are being converted correctly per translators. I have *not* seen the case when
{code}
select nvl(e1, '') from table1, table2 where table1.e1 = table2.e1
{code}
to
{code}
select isnull(e1) from table1, table2 where table1.e1 = table2.e1
{code}
in fact the code converts to
{code}
select isnull(e1,'') from table1, table2 where table1.e1 = table2.e1
{code}
so, I advise you check what is mis-configuration step you did in your setup?
> correct the nvl pushdown for the impala translator
> --------------------------------------------------
>
> Key: TEIID-4705
> URL: https://issues.jboss.org/browse/TEIID-4705
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Johnathon Lee
> Assignee: Steven Hawkins
>
> queries consisting of the nvl(x, y) function will fail since JDV translates to isnull(x,y)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4682) PrestoDB translator - cannot use temp tables - PrestoDB could not commit transaction
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4682?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4682:
------------------------------------
With jdurani's assist I can reproduce the issue now.
> PrestoDB translator - cannot use temp tables - PrestoDB could not commit transaction
> ------------------------------------------------------------------------------------
>
> Key: TEIID-4682
> URL: https://issues.jboss.org/browse/TEIID-4682
> 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
>
>
> Teiid cannot properly insert data into temp table from PrestoDB tables. Teiid seems to try commit transaction on PrestoDB connection which is in auto-commit mode. Data are pulled from the PrestoDB, but operation fails on closing the processor.
> Query \[1\], log \[2\].
> {code:sql|title=\[1\]}
> INSERT INTO #t SELECT IntKey FROM Bqt1.Smalla
> {code}
> {code:plain|title=\[2\]}
> 4:29:14,758 DEBUG [org.teiid.TRANSPORT] (New I/O worker #3) processing message:MessageHolder: key=248 contents=Invoke interface org.teiid.client.DQP.executeRequest
> 14:29:14,763 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) Request Thread A7WqBzZhsyYM.47 with state NEW
> 14:29:14,763 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47 Command has no cache hint and result set cache mode is not on.
> 14:29:14,763 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47 executing INSERT INTO #t SELECT IntKey FROM Bqt1.Smalla
> 14:29:14,768 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) ProcessTree for A7WqBzZhsyYM.47 ProjectIntoNode(0) output=[Count] #t
> AccessNode(1) output=[IntKey] SELECT g_0.IntKey FROM Source.SmallA AS g_0
> 14:29:14,768 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) before getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@168af7b8(A7WqBzZhsyYM)
> 14:29:14,769 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) after getOrCreateTransactionContext : A7WqBzZhsyYM NONE ID:NONE
> 14:29:14,769 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) before begin:org.teiid.dqp.internal.process.TransactionServerImpl@168af7b8(A7WqBzZhsyYM NONE ID:NONE)
> 14:29:14,769 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) after begin : null
> 14:29:14,769 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Creating TupleBuffer: 71 [Count] [class java.lang.Integer] batch size 2048 of type PROCESSOR
> 14:29:14,769 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) before resume:org.teiid.dqp.internal.process.TransactionServerImpl@168af7b8(A7WqBzZhsyYM REQUEST ID:TransactionImple < ac, BasicAction: 0:ffff0a2804a3:-d43e932:586f78d7:23a status: ActionStatus.RUNNING >)
> 14:29:14,769 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) after resume : null
> 14:29:14,769 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Create State
> 14:29:14,770 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Processing NEW request: SELECT g_0.IntKey FROM Source.SmallA AS g_0
> 14:29:15,290 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Obtained execution
> 14:29:15,290 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) Source-specific command: SELECT g_0.intkey FROM smalla AS g_0
> 14:29:15,613 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Executed command
> 14:29:15,614 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Processing MORE request
> 14:29:15,614 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Getting results from connector
> 14:29:15,772 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Obtained last batch, total row count: 50
> 14:29:15,772 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Remove State
> 14:29:15,772 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Processing Close : SELECT g_0.IntKey FROM Source.SmallA AS g_0
> 14:29:15,773 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Closed execution
> 14:29:15,773 DEBUG [org.teiid.CONNECTOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47.1.31 Closed connection
> 14:29:15,773 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Creating TupleBuffer: 72 [#t.IntKey] [class java.lang.Integer] batch size 2048 of type PROCESSOR
> 14:29:15,773 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) Creating temporary table #t
> 14:29:15,774 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Creating STree: 73
> 14:29:15,774 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Creating TupleBuffer: 75 [rowId, #t.IntKey] [class java.lang.Integer, class java.lang.Integer] batch size 2048 of type PROCESSOR
> 14:29:15,774 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Removing TupleBuffer: 72
> 14:29:15,774 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Removing TupleBuffer: 75
> 14:29:15,775 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) QueryProcessor: closing processor
> 14:29:15,775 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) A7WqBzZhsyYM.47 Finished Processing
> 14:29:15,775 DEBUG [org.teiid.TXN_LOG] (Worker26_QueryProcessorQueue135) before commit:org.teiid.dqp.internal.process.TransactionServerImpl@168af7b8(A7WqBzZhsyYM REQUEST ID:TransactionImple < ac, BasicAction: 0:ffff0a2804a3:-d43e932:586f78d7:23a status: ActionStatus.RUNNING >)
> 14:29:15,775 WARN [com.arjuna.ats.jta] (Worker26_QueryProcessorQueue135) ARJUNA016039: onePhaseCommit on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a2804a3:-d43e932:586f78d7:23a, node_name=1, branch_uid=0:ffff0a2804a3:-d43e932:586f78d7:23d, subordinatenodename=null, eis_name=java:/PrestoDB > (LocalXAResourceImpl@1e4cfe92[connectionListener=1a737904 connectionManager=4bd5154a warned=false currentXid=null productName=Presto productVersion=0.161 jndiName=java:/PrestoDB]) failed with exception XAException.XA_RBROLLBACK: org.jboss.jca.core.spi.transaction.local.LocalXAException: IJ001156: Could not commit local transaction
> at org.jboss.jca.core.tx.jbossts.LocalXAResourceImpl.commit(LocalXAResourceImpl.java:176) [ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
> at com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.commit(XAOnePhaseResource.java:120)
> at com.arjuna.ats.internal.arjuna.abstractrecords.LastResourceRecord.topLevelPrepare(LastResourceRecord.java:152)
> at com.arjuna.ats.arjuna.coordinator.AbstractRecord.topLevelOnePhaseCommit(AbstractRecord.java:423)
> at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2287)
> at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1488)
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:98)
> at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1211)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
> at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
> at org.teiid.dqp.internal.process.TransactionServerImpl.commitDirect(TransactionServerImpl.java:411) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.TransactionServerImpl.commit(TransactionServerImpl.java:542) [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.logging.LogManager$LoggingProxy.invoke(LogManager.java:121) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy19.commit(Unknown Source)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:494) [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: javax.resource.ResourceException: SQLException
> at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:1198)
> at org.jboss.jca.adapters.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:107)
> at org.jboss.jca.core.tx.jbossts.LocalXAResourceImpl.commit(LocalXAResourceImpl.java:171) [ironjacamar-core-impl-1.0.37.Final-redhat-1.jar:1.0.37.Final-redhat-1]
> ... 28 more
> Caused by: java.sql.SQLException: Connection is in auto-commit mode
> at com.facebook.presto.jdbc.PrestoConnection.commit(PrestoConnection.java:144)
> at org.jboss.jca.adapters.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:96)
> ... 29 more
> 14:29:15,780 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) Rolling back txn TransactionImple < ac, BasicAction: 0:ffff0a2804a3:-d43e932:586f78d7:23a status: ActionStatus.RUNNING > restoring [] using rollback tables {}
> 14:29:15,780 WARN [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) TEIID30020 Processing exception for request A7WqBzZhsyYM.47 'TEIID30530 javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.'. Originally XATransactionException TransactionImple.java:1223.: org.teiid.client.xa.XATransactionException: TEIID30530 javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
> at org.teiid.dqp.internal.process.TransactionServerImpl.commitDirect(TransactionServerImpl.java:415) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.dqp.internal.process.TransactionServerImpl.commit(TransactionServerImpl.java:542) [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.logging.LogManager$LoggingProxy.invoke(LogManager.java:121) [teiid-api-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at com.sun.proxy.$Proxy19.commit(Unknown Source)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:494) [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: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1223)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
> at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
> at org.teiid.dqp.internal.process.TransactionServerImpl.commitDirect(TransactionServerImpl.java:411) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 17 more
> 14:29:15,781 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) Removing tuplesource for the request A7WqBzZhsyYM.47
> 14:29:15,781 DEBUG [org.teiid.BUFFER_MGR] (Worker26_QueryProcessorQueue135) Removing TupleBuffer: 71
> 14:29:15,781 DEBUG [org.teiid.PROCESSOR] (Worker26_QueryProcessorQueue135) org.teiid.client.xa.XATransactionException: TEIID30530 javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction. Sending error to client A7WqBzZhsyYM.47
> 14:29:15,782 DEBUG [org.teiid.TRANSPORT] (Worker26_QueryProcessorQueue135) send message: MessageHolder: key=248 contents=ResultsMessage rowCount=0 finalRow=-1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4707) upgrade pre-intalled PrestoDB driver
by Kylin Soong (JIRA)
Kylin Soong created TEIID-4707:
----------------------------------
Summary: upgrade pre-intalled PrestoDB driver
Key: TEIID-4707
URL: https://issues.jboss.org/browse/TEIID-4707
Project: Teiid
Issue Type: Quality Risk
Components: Misc. Connectors
Affects Versions: 9.2
Reporter: Kylin Soong
Assignee: Kylin Soong
Upstream code pre-installed presto-jdbc-0.89.jar as prestoDB driver, there are almost 80 later version after 0.89, we may need upgrade to a later version.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months
[JBoss JIRA] (TEIID-4706) PrestoDBMetadataProcessor load metadata failed due to Duplicate Table
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4706?page=com.atlassian.jira.plugin... ]
Kylin Soong updated TEIID-4706:
-------------------------------
Attachment: module.zip
> PrestoDBMetadataProcessor load metadata failed due to Duplicate Table
> ---------------------------------------------------------------------
>
> Key: TEIID-4706
> URL: https://issues.jboss.org/browse/TEIID-4706
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Environment: Scenario one
> * Presto 0.163 with one mysql catalog added
> * Teiid 9.2.0.Beta2-SNAPSHOT in embedded mode
> Scenario two
> * Presto 0.162 with one mysql catalog added(QE test environment)
> * Teiid 9.2.0.Beta2-SNAPSHOT server
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Attachments: TEIID4682Presto.java, module.zip, teiid4682-server-vdb.xml, teiid4682-vdb.xml
>
>
> PrestoDBMetadataProcessor use 'SHOW CATALOGS', 'SHOW TABLES FROM ...' to load tables from presto, presto default has a system catalog, in my test I only add one mysql catalog
> {code}
> SQL: SHOW CATALOGS
> +---------+
> | Catalog |
> +---------+
> | mysql |
> | system |
> +---------+
> {code}
> Note that both mysql and system has schema: *information_schema*:
> {code}
> SQL: SHOW SCHEMAS FROM mysql
> +--------------------+
> | Schema |
> +--------------------+
> | information_schema |
> | teiid |
> +--------------------+
> SQL: SHOW SCHEMAS FROM system
> +--------------------+
> | Schema |
> +--------------------+
> | information_schema |
> | jdbc |
> | metadata |
> | runtime |
> +--------------------+
> {code}
> Schema in different catalog contain the same tables
> {code}
> SQL: SHOW TABLES FROM mysql.information_schema
> +-------------------------+
> | Table |
> +-------------------------+
> | __internal_partitions__ |
> | columns |
> | schemata |
> | tables |
> | views |
> +-------------------------+
> SQL: SHOW TABLES FROM system.information_schema
> +-------------------------+
> | Table |
> +-------------------------+
> | __internal_partitions__ |
> | columns |
> | schemata |
> | tables |
> | views |
> +-------------------------+
> {code}
> Due the table name in both system.information_schema and mysql.information_schema has same table name, the *TEIID60013 Duplicate Table* through
> {code}
> Exception in thread "main" org.teiid.metadata.DuplicateRecordException: TEIID60013 Duplicate Table __internal_partitions__
> at org.teiid.metadata.Schema.addTable(Schema.java:49)
> at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:231)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataProcessor.java:368)
> at org.teiid.translator.prestodb.PrestoDBMetadataProcessor.addTable(PrestoDBMetadataProcessor.java:147)
> at org.teiid.translator.prestodb.PrestoDBMetadataProcessor.getConnectorMetadata(PrestoDBMetadataProcessor.java:74)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.runtime.EmbeddedServer.loadMetadata(EmbeddedServer.java:816)
> at org.teiid.runtime.AbstractVDBDeployer.loadMetadata(AbstractVDBDeployer.java:210)
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:766)
> at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:707)
> at org.teiid.test.teiid4699.TEIID4682Presto.main(TEIID4682Presto.java:41)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 8 months