db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2998) Add support for ROW_NUMBER() window function
Date Mon, 26 Nov 2007 10:55:43 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545401
] 

Knut Anders Hatlen commented on DERBY-2998:
-------------------------------------------

Hi Thomas,

It seems like the predicates are pushed too far down in some cases for < as well. Try for
instance a join where the first rows of one the tables are not part of the result:

ij> create table t1 (x int);
0 rows inserted/updated/deleted
ij> create table t2 (y int);
0 rows inserted/updated/deleted
ij> insert into t1 values 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20;
20 rows inserted/updated/deleted
ij> insert into t2 values 19,20,21,22,23,24,25,26,27,28,29,30;
12 rows inserted/updated/deleted
ij> select row_number(),x from t1,t2 where x=y;
row_number()        |X          
--------------------------------
1                   |19         
2                   |20         

2 rows selected
ij> select * from (select row_number(),x from t1,t2 where x=y) s(r,x) where r < 3;
R                   |X          
--------------------------------

0 rows selected

> Add support for ROW_NUMBER() window function
> --------------------------------------------
>
>                 Key: DERBY-2998
>                 URL: https://issues.apache.org/jira/browse/DERBY-2998
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Thomas Nielsen
>            Assignee: Thomas Nielsen
>            Priority: Minor
>         Attachments: d2998-4.diff, d2998-4.stat
>
>
> As part of implementing the overall OLAP Operations features of SQL (DERBY-581), implement
the ROW_NUMBER() window function.
> More information about this feature is available at http://wiki.apache.org/db-derby/OLAPRowNumber

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message