[JBoss JIRA] (TEIID-3201) Pushing a predicate when it is used only in a window function partition
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3201?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3201.
---------------------------------
> Pushing a predicate when it is used only in a window function partition
> -----------------------------------------------------------------------
>
> Key: TEIID-3201
> URL: https://issues.jboss.org/browse/TEIID-3201
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> The issue was described in the following community post: https://developer.jboss.org/thread/249972
> I have a table that contains some temperature values. I'd like to make some time series selecting the previous value by joining all previous values and selecting the first previous value using the rank function.
> e.g.
> select v.*
> from(
> select mv1.admissionid, mv1.time as temptime, mv1.value as degrees, mv2.time as previoustime, mv2.value as previousdegrees,
> rank() over(partition by mv1.admissionid, mv1.time order by mv2.time desc) as rang
> from cos2_monitorvalue mv1
> left join cos2_monitorvalue mv2 on
> mv2.admissionid = mv1.admissionid and
> mv2.time < mv1.time and
> mv2.variableid = mv1.variableid
> where mv1.variableid = 'TEMPCENTR'
> ) v
> where v.rang = 1 and
> v.admissionid = 11111
> Is there a way to tell Teiid that v.admissionid should be used when selecting rows from mv1?
> Reply from Steven Hawkins on this question:
> The current logic (8.4+) is checking if the predicate is compatible with the partition, but if there is an ordering on the window function then the predicate won't be pushed. This is too strict for the case that you have where the predicate is just over the partition - if it were against any other columns it could alter the aggregate values. Can you convert this to an issue?
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3051) grant all should not be transitive to importing vdbs
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3051?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3051.
---------------------------------
> grant all should not be transitive to importing vdbs
> ----------------------------------------------------
>
> Key: TEIID-3051
> URL: https://issues.jboss.org/browse/TEIID-3051
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.9
>
>
> If the grant all option is in an imported vdb it will not only grant all permissions in the imported vdb, but the importing vdb as well. We should ensure that the scope is narrower - however there are some permissions that are currently not schema scoped (such as temp table support) that would still be picked up from the imported vdb.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3198) NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3198?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3198.
---------------------------------
> NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
> ----------------------------------------------------------------------------------------------
>
> Key: TEIID-3198
> URL: https://issues.jboss.org/browse/TEIID-3198
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> I defined a virtual procedure in the VDB using the following definition:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''';
> end;
> ]]>
> </metadata>
> </model>
> {code}
> When I call the virtual procedure:
> {code:sql}exec test_procs.p1(1);{code}
>
> I get the following NPE:
> {code:sql}
> 12:56:59,868 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue37) sAgKanG+4e4X TEIID30019 Unexpected exception for request sAgKanG+4e4X.0: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.filterVirtualElements(RuleAssignOutputElements.java:477) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:238) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:292) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.execute(RuleAssignOutputElements.java:117) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:739) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:221) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:379) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:288) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:262) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
> As a workaround, if I use the clause "WITHOUT RETURN" in the execute immediate command, the procedure is correctly executed:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''' WITHOUT RETURN;
> end;
> ]]>
> </metadata>
> </model>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3058) Cassandra: cannot compare timestamp field in where clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3058?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3058.
---------------------------------
> Cassandra: cannot compare timestamp field in where clause
> ----------------------------------------------------------
>
> Key: TEIID-3058
> URL: https://issues.jboss.org/browse/TEIID-3058
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7
> Environment: Cassandra with Teiid 8.7
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.9
>
>
> It seems like Teiid is having problem to compare translate CQL if there is timestamp comparison in where clause:
> ORIGINAL SQL:
> select "cassandrads_sales"."product_family" as "cassandrads_sales_product_family",
> "cassandrads_sales"."product_family" as "cassandrads_sales_product_family1"
> from "cassandrads"."sales" "cassandrads_sales"
> where "cassandrads_sales"."the_date" <= '2013-05-01 00:00:00'
> limit 1000
> TRANSLATED CQL:
> SELECT cassandrads.sales.product_family FROM cassandrads.sales WHERE cassandrads.sales.the_date <= {ts'2013-05-01 00:00:00.0'} LIMIT 1000
> And I got this error:
> Caused by: org.teiid.translator.TranslatorException: line 1:55 no viable alternative at input '2013-05-01 00:00:0
> at org.teiid.translator.cassandra.CassandraQueryExecution.execute(CassandraQueryExecution.java:80)
> at org.teiid.translator.cassandra.CassandraQueryExecution.execute(CassandraQueryExecution.java:72)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:325)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:135)
> If it is not possible to do time/ data comparison for CQL, maybe you guys should consider to do it in memory instead. Thanks.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3190) The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String" - TEIID 8.9.BETA1
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3190?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3190.
---------------------------------
> The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String" - TEIID 8.9.BETA1
> -------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3190
> URL: https://issues.jboss.org/browse/TEIID-3190
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4
> Reporter: Alex K.
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.9
>
>
> issuing the following query
> {code:sql}
> insert into pgsql.xyz select * from (select uuid() from mysql.test_a limit 5) a LIMIT 0
> {code}
> Throws the following exception for me. The same query with LIMIT 1 instead of LIMIT 0 correctly works.
>
> {code:java}
> ERROR [org.teiid.TRANSPORT] (New I/O worker #2) null TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteExcepti
> on: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure that the c
> olumn's modeled datatype matches the expected data.
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:136) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.2.Final.jar:]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.2.Final.jar:]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.2.Final.jar:]
> at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:93) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:87) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:926) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:642) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:223) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:194) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:444) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:326) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:254) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.Beta1.jar:8.9.0.Beta1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure tha
> t the column's modeled datatype matches the expected data.
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:851) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:317) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_51]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_51]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_51]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.9.0.Beta1.jar:8.9.0.Beta1]
> ... 25 more
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
> at org.teiid.client.BatchSerializer$IntColumnSerializer.writeObject(BatchSerializer.java:535) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:506) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:840) [teiid-client-8.9.0.Beta1.jar:8.9.0.Beta1]
> ... 36 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3065) SOLR: NPE When issued query with SORT
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3065?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3065.
---------------------------------
> SOLR: NPE When issued query with SORT
> -------------------------------------
>
> Key: TEIID-3065
> URL: https://issues.jboss.org/browse/TEIID-3065
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.6
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Labels: Alpaha1
> Fix For: 8.7.1, 8.9
>
>
> A query like
> select id as c_0 from index order by c_0
> ends in exception
> {code}
> 14:39:41,152 ERROR [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue306) Connector worker process failed for atomic-request=1IQ9x3qmpUQr.13.4.9: java.lang.NullPointerException
> at org.teiid.translator.solr.SolrSQLHierarchyVistor.visit(SolrSQLHierarchyVistor.java:70)
> at org.teiid.language.ColumnReference.acceptVisitor(ColumnReference.java:72) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.translator.solr.SolrSQLHierarchyVistor.visit(SolrSQLHierarchyVistor.java:248)
> at org.teiid.language.SortSpecification.acceptVisitor(SortSpecification.java:53) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNodes(AbstractLanguageVisitor.java:63) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.translator.solr.SolrSQLHierarchyVistor.visit(SolrSQLHierarchyVistor.java:243)
> at org.teiid.language.OrderBy.acceptVisitor(OrderBy.java:45) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.7.1.redhat-1.jar:8.7.1.redhat-1]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months