[
https://issues.apache.org/jira/browse/TRAFODION-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Suresh Subbiah reassigned TRAFODION-2273:
-----------------------------------------
Assignee: Suresh Subbiah
> Predicate on "partition by" columns in sequence function should be pushed down
> ------------------------------------------------------------------------------
>
> Key: TRAFODION-2273
> URL: https://issues.apache.org/jira/browse/TRAFODION-2273
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.0-incubating
> Reporter: Hans Zeller
> Assignee: Suresh Subbiah
> Priority: Minor
>
> The sequence operator that implements OLAP functions like RANK() has to
> prevent certain predicates from being pushed down. Right now it is too
> conservative, though. It prevents predicates on the PARTITION BY columns from
> being pushed down, too. Here is an example:
> {noformat}
> create table tseq1(a int, b int);
> insert into tseq1 values (1,1), (1,2), (2,1), (2,2);
> explain
> select *
> from (select a, b, rank() over(partition by a order by b) r
> from tseq1)
> where a < 2 and b = 2 and r > 1;
> {noformat}
> Predicate "a<2" should be pushed down to the scan of table tseq1, but it
> isn't. This is not incorrect, but also not very efficient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)