[JBoss JIRA] (TEIID-4875) Planning issue with multiple aggregate decompositions through a join tree
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4875?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4875:
---------------------------------------
More than likely it is not this issue that needs reopened, unless you see something similar on master. I'll have to examine the backport and see what is going on and if there are other issues that are applicable.
> Planning issue with multiple aggregate decompositions through a join tree
> -------------------------------------------------------------------------
>
> Key: TEIID-4875
> URL: https://issues.jboss.org/browse/TEIID-4875
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.3, 8.12.x-6.4, 9.2.3, 8.12.11.6_3
>
>
> The logic for determining other symbols from aggregates will not work correctly when a staged grouping is initially pushed and another staged grouping is then pushed above a join that is above that location (typically due to join predicates that pull in other groups).
> A query such as:
> SELECT max(t3.e4), max(t2.e4) as s FROM pm1.g1 as t1, pm1.g2 as t2, pm1.g3 as t3, pm1.g4 as t4, pm2.g1 as t5 WHERE t1.e1 = t2.e1 and (t2.e2 = t3.e2 and t1.e3 || t2.e3 = t3.e3) and t3.e3 = t4.e3 and t4.e4 = t5.e4
> With capabilities that disable join pushdown will fail with an assertionerror that a staged grouping symbol cannot be found during the initialization of the parent join node.
> java.lang.AssertionError: ASSERTION FAILED: expected reference to be not null
> at org.teiid.core.util.Assertion.failed(Assertion.java:73)
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:100)
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:92)
> at org.teiid.query.processor.relational.RelationalNode.getProjectionIndexes(RelationalNode.java:367)
> at org.teiid.query.processor.relational.JoinNode.initialize(JoinNode.java:133)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:96)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102)
> at org.teiid.query.processor.relational.RelationalPlan.initialize(RelationalPlan.java:91)
> at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:226)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (TEIID-4875) Planning issue with multiple aggregate decompositions through a join tree
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4875?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4875:
------------------------------------
[~shawkins] I think we need to reopen this issue. I tested with 8.12.11.6_3 version:
{code:sql|title=query}
SELECT max(t3.e4),max(t2.e4) as s
FROM pm1.teiid4875g1 as t1, pm1.teiid4875g2 as t2, pm1.teiid4875g3 as t3, pm1.teiid4875g4 as t4, pm2.teiid4875g1 as t5
WHERE t1.e1 = t2.e1 and (t2.e2 = t3.e2 and t1.e3 || t2.e3 = t3.e3) and t3.e3 = t4.e3 and t4.e4 = t5.e4
{code}
I am getting an exception about non-existent column (tested on h2 database):
{code:plain|title=stacktrace}
org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 pm1: 42122 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1]
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:721)
at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:560)
at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
at com.sun.proxy.$Proxy25.read(Unknown Source)
at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:569)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:422)
at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:353)
at org.jboss.qe.dvqe.reproducers.Teiid4875Test.testMultiJoinCriteria(Teiid4875Test.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)
at org.jboss.qe.DVQETestListener.run(DVQETestListener.java:276)
at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: org.teiid.core.TeiidProcessingException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 pm1: 42122 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1]
at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401)
at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161)
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.relational.SourceState.prefetch(SourceState.java:211)
at org.teiid.query.processor.relational.SourceState.rowCountLE(SourceState.java:158)
at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.shouldIndex(EnhancedSortMergeJoinStrategy.java:360)
at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.loadRight(EnhancedSortMergeJoinStrategy.java:250)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:232)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.relational.SourceState.prefetch(SourceState.java:211)
at org.teiid.query.processor.relational.SourceState.rowCountLE(SourceState.java:158)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.relational.SourceState.prefetch(SourceState.java:211)
at org.teiid.query.processor.relational.SourceState.rowCountLE(SourceState.java:158)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
at org.teiid.query.processor.relational.GroupingNode.groupPhase(GroupingNode.java:566)
at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:362)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
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)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.teiid.translator.TranslatorException: 42122 Remote org.teiid.translator.jdbc.JDBCExecutionException: 42122 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy81.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)
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
... 6 common frames omitted
Caused by: java.sql.SQLException: Remote org.h2.jdbc.JdbcSQLException: Column "ANON_GRP1.GCOL0" not found; SQL statement:
SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1 [42122-168]
at org.h2.engine.SessionRemote.done(SessionRemote.java:567)
at org.h2.command.CommandRemote.prepare(CommandRemote.java:67)
at org.h2.command.CommandRemote.<init>(CommandRemote.java:46)
at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:439)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1109)
at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:626)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:744)
at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:730)
at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:405)
at org.teiid.translator.jdbc.JDBCBaseExecution.getPreparedStatement(JDBCBaseExecution.java:196)
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:121)
... 18 common frames omitted
{code}
{code:xml|title=vdb}
<vdb name="teiid4875" version="1">
<model name="pm1">
<source name="pm1" translator-name="h2-override"
connection-jndi-name="java:/h2-localhost-9292-ds" />
<metadata type="DDL">
<![CDATA[
CREATE FOREIGN TABLE teiid4875g1(e1 string, e2 string, e3 string , e4 string);
CREATE FOREIGN TABLE teiid4875g2(e1 string, e2 string, e3 string , e4 string);
CREATE FOREIGN TABLE teiid4875g3(e1 string, e2 string, e3 string , e4 string);
CREATE FOREIGN TABLE teiid4875g4(e1 string, e2 string, e3 string , e4 string);
]]></metadata>
</model>
<model name="pm2">
<source name="pm2" translator-name="h2-override"
connection-jndi-name="java:/h2-localhost-9292-ds2" />
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE teiid4875g1(e1 string, e2 string, e3 string , e4 string);
]]></metadata>
</model>
<translator name="h2-override" type="h2">
<property name="MaxInCriteriaSize" value="2" />
<property name="SupportsInnerJoins" value="false" />
<property name="SupportsOuterJoins" value="false" />
</translator>
</vdb>
{code}
{code:plain|title=teiid-command.log}
11:51:15,600 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) xB8yWvRcaM5p START USER COMMAND: startTime=2017-05-22 11:51:15.6 requestID=xB8yWvRcaM5p.0 txID=null sessionID=xB8yWvRcaM5p applicationName=JDBC principal=user@teiid-security vdbName=teiid4875 vdbVersion=1 sql=SELECT max(t3.e4),max(t2.e4) as s FROM pm1.teiid4875g1 as t1, pm1.teiid4875g2 as t2, pm1.teiid4875g3 as t3, pm1.teiid4875g4 as t4, pm2.teiid4875g1 as t5 WHERE t1.e1 = t2.e1 and (t2.e2 = t3.e2 and t1.e3 || t2.e3 = t3.e3) and t3.e3 = t4.e3 and t4.e4 = t5.e4
11:51:15,810 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) xB8yWvRcaM5p START DATA SRC COMMAND: startTime=2017-05-22 11:51:15.809 requestID=xB8yWvRcaM5p.0 sourceCommandID=12 executionID=0 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sql=SELECT DISTINCT g_0.e1 AS c_0, g_0.e3 AS c_1 FROM pm1.teiid4875g1 AS g_0 ORDER BY c_0
11:51:15,810 DEBUG [org.teiid.COMMAND_LOG] (Worker5_QueryProcessorQueue4) xB8yWvRcaM5p START DATA SRC COMMAND: startTime=2017-05-22 11:51:15.81 requestID=xB8yWvRcaM5p.0 sourceCommandID=16 executionID=4 txID=null modelName=pm2 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sql=SELECT DISTINCT g_0.e4 AS c_0 FROM pm2.teiid4875g1 AS g_0 ORDER BY c_0
11:51:15,810 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue2) xB8yWvRcaM5p START DATA SRC COMMAND: startTime=2017-05-22 11:51:15.81 requestID=xB8yWvRcaM5p.0 sourceCommandID=13 executionID=1 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sql=SELECT DISTINCT g_0.e1 AS c_0, g_0.e2 AS c_1, g_0.e3 AS c_2, g_0.e4 AS c_3 FROM pm1.teiid4875g2 AS g_0 ORDER BY c_0
11:51:15,810 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue3) xB8yWvRcaM5p START DATA SRC COMMAND: startTime=2017-05-22 11:51:15.81 requestID=xB8yWvRcaM5p.0 sourceCommandID=14 executionID=2 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sql=SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM pm1.teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1
11:51:15,810 DEBUG [org.teiid.COMMAND_LOG] (Worker4_QueryProcessorQueue5) xB8yWvRcaM5p START DATA SRC COMMAND: startTime=2017-05-22 11:51:15.81 requestID=xB8yWvRcaM5p.0 sourceCommandID=15 executionID=3 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sql=SELECT DISTINCT g_0.e3 AS c_0, g_0.e4 AS c_1 FROM pm1.teiid4875g4 AS g_0 ORDER BY c_0
11:51:15,816 DEBUG [org.teiid.COMMAND_LOG] (Worker4_QueryProcessorQueue5) xB8yWvRcaM5p SOURCE SRC COMMAND: endTime=2017-05-22 11:51:15.816 requestID=xB8yWvRcaM5p.0 sourceCommandID=15 executionID=3 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sourceCommand=[SELECT DISTINCT g_0.e3 AS c_0, g_0.e4 AS c_1 FROM teiid4875g4 AS g_0 ORDER BY c_0]
11:51:15,816 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue3) xB8yWvRcaM5p SOURCE SRC COMMAND: endTime=2017-05-22 11:51:15.816 requestID=xB8yWvRcaM5p.0 sourceCommandID=14 executionID=2 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sourceCommand=[SELECT anon_grp1.gcol0 AS c_0, anon_grp1.gcol1 AS c_1, anon_grp1.agg0 AS c_2 FROM teiid4875g3 AS g_0 GROUP BY anon_grp1.gcol0, anon_grp1.gcol1, anon_grp1.agg0 ORDER BY c_0, c_1]
11:51:15,816 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) xB8yWvRcaM5p SOURCE SRC COMMAND: endTime=2017-05-22 11:51:15.816 requestID=xB8yWvRcaM5p.0 sourceCommandID=12 executionID=0 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sourceCommand=[SELECT DISTINCT g_0.e1 AS c_0, g_0.e3 AS c_1 FROM teiid4875g1 AS g_0 ORDER BY c_0]
11:51:15,816 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue2) xB8yWvRcaM5p SOURCE SRC COMMAND: endTime=2017-05-22 11:51:15.816 requestID=xB8yWvRcaM5p.0 sourceCommandID=13 executionID=1 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sourceCommand=[SELECT DISTINCT g_0.e1 AS c_0, g_0.e2 AS c_1, g_0.e3 AS c_2, g_0.e4 AS c_3 FROM teiid4875g2 AS g_0 ORDER BY c_0]
11:51:15,817 DEBUG [org.teiid.COMMAND_LOG] (Worker5_QueryProcessorQueue4) xB8yWvRcaM5p SOURCE SRC COMMAND: endTime=2017-05-22 11:51:15.816 requestID=xB8yWvRcaM5p.0 sourceCommandID=16 executionID=4 txID=null modelName=pm2 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security sourceCommand=[SELECT DISTINCT g_0.e4 AS c_0 FROM teiid4875g1 AS g_0 ORDER BY c_0]
11:51:15,835 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue6) xB8yWvRcaM5p END SRC COMMAND: endTime=2017-05-22 11:51:15.835 requestID=xB8yWvRcaM5p.0 sourceCommandID=12 executionID=0 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security finalRowCount=15 cpuTime(ns)=12980517
11:51:15,836 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue3) xB8yWvRcaM5p ERROR SRC COMMAND: endTime=2017-05-22 11:51:15.836 requestID=xB8yWvRcaM5p.0 sourceCommandID=14 executionID=2 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security
11:51:15,840 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue6) xB8yWvRcaM5p END SRC COMMAND: endTime=2017-05-22 11:51:15.84 requestID=xB8yWvRcaM5p.0 sourceCommandID=13 executionID=1 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security finalRowCount=15 cpuTime(ns)=11535709
11:51:15,854 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue6) xB8yWvRcaM5p END SRC COMMAND: endTime=2017-05-22 11:51:15.854 requestID=xB8yWvRcaM5p.0 sourceCommandID=15 executionID=3 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security finalRowCount=15 cpuTime(ns)=4359862
11:51:15,860 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue6) xB8yWvRcaM5p END SRC COMMAND: endTime=2017-05-22 11:51:15.86 requestID=xB8yWvRcaM5p.0 sourceCommandID=16 executionID=4 txID=null modelName=pm2 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security finalRowCount=15 cpuTime(ns)=6678508
11:51:15,866 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue7) xB8yWvRcaM5p END SRC COMMAND: endTime=2017-05-22 11:51:15.866 requestID=xB8yWvRcaM5p.0 sourceCommandID=14 executionID=2 txID=null modelName=pm1 translatorName=h2-override sessionID=xB8yWvRcaM5p principal=user@teiid-security finalRowCount=0 cpuTime(ns)=15503645
11:51:15,873 INFO [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue7) xB8yWvRcaM5p ERROR USER COMMAND: endTime=2017-05-22 11:51:15.872 requestID=xB8yWvRcaM5p.0 txID=null sessionID=xB8yWvRcaM5p principal=user@teiid-security vdbName=teiid4875 vdbVersion=1 finalRowCount=null
11:51:15,949 INFO [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue7) xB8yWvRcaM5p END USER COMMAND: endTime=2017-05-22 11:51:15.949 requestID=xB8yWvRcaM5p.0 txID=null sessionID=xB8yWvRcaM5p principal=user@teiid-security vdbName=teiid4875 vdbVersion=1 finalRowCount=0
{code}
> Planning issue with multiple aggregate decompositions through a join tree
> -------------------------------------------------------------------------
>
> Key: TEIID-4875
> URL: https://issues.jboss.org/browse/TEIID-4875
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.3, 8.12.x-6.4, 9.2.3, 8.12.11.6_3
>
>
> The logic for determining other symbols from aggregates will not work correctly when a staged grouping is initially pushed and another staged grouping is then pushed above a join that is above that location (typically due to join predicates that pull in other groups).
> A query such as:
> SELECT max(t3.e4), max(t2.e4) as s FROM pm1.g1 as t1, pm1.g2 as t2, pm1.g3 as t3, pm1.g4 as t4, pm2.g1 as t5 WHERE t1.e1 = t2.e1 and (t2.e2 = t3.e2 and t1.e3 || t2.e3 = t3.e3) and t3.e3 = t4.e3 and t4.e4 = t5.e4
> With capabilities that disable join pushdown will fail with an assertionerror that a staged grouping symbol cannot be found during the initialization of the parent join node.
> java.lang.AssertionError: ASSERTION FAILED: expected reference to be not null
> at org.teiid.core.util.Assertion.failed(Assertion.java:73)
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:100)
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:92)
> at org.teiid.query.processor.relational.RelationalNode.getProjectionIndexes(RelationalNode.java:367)
> at org.teiid.query.processor.relational.JoinNode.initialize(JoinNode.java:133)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:96)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102)
> at org.teiid.query.processor.relational.RelationalPlan.connectExternal(RelationalPlan.java:102)
> at org.teiid.query.processor.relational.RelationalPlan.initialize(RelationalPlan.java:91)
> at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:226)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:138)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (TEIID-4228) ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4228?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4228:
---------------------------------------
Designer should not allow you to set those values. Precision can never be zero and scale can never be greater than precision. For backwards compatibility the server is treating 0 as undefined precision and returning the max instead. I'll have to double check if it's expected for us to then return as the scale.
> ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4228
> URL: https://issues.jboss.org/browse/TEIID-4228
> Project: Teiid
> Issue Type: Sub-task
> Components: ODBC
> Affects Versions: 8.7
> Environment: Connections through ODBC driver
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.1
>
>
> Connections through ODBC driver with the driver setting "Parse Statements" option enabled can result in incorrect length values being passed to the client. In some cases (such as SQL Server linked server capabilities), this can result in the client throwing exceptions due to the expected LENGTH changing during the course of the query execution.
> This may be limited to columns with precision set to 0, as the SQL Server linked server case was corrected when the precision was changed from 0 to 9 for the column specified in the error.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months
[JBoss JIRA] (TEIID-4228) ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
by Lucie Fabrikova (JIRA)
[ https://issues.jboss.org/browse/TEIID-4228?page=com.atlassian.jira.plugin... ]
Lucie Fabrikova commented on TEIID-4228:
----------------------------------------
I created vdb via teiid designer with bigdecimal type column with precision set to 0 and scale to 2, then ResultSetMetaData.getPrecision() returned 32767 and ResultSetMetaData.getScale() returned 0. Is the value of scale expected?
> ODBC "Parse Statements" option can result in changes in LENGTH metadata for columns
> -----------------------------------------------------------------------------------
>
> Key: TEIID-4228
> URL: https://issues.jboss.org/browse/TEIID-4228
> Project: Teiid
> Issue Type: Sub-task
> Components: ODBC
> Affects Versions: 8.7
> Environment: Connections through ODBC driver
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 9.1
>
>
> Connections through ODBC driver with the driver setting "Parse Statements" option enabled can result in incorrect length values being passed to the client. In some cases (such as SQL Server linked server capabilities), this can result in the client throwing exceptions due to the expected LENGTH changing during the course of the query execution.
> This may be limited to columns with precision set to 0, as the SQL Server linked server case was corrected when the precision was changed from 0 to 9 for the column specified in the error.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 10 months