db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Nielsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2998) Add support for ROW_NUMBER() window function
Date Tue, 23 Oct 2007 12:49:50 GMT

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

Thomas Nielsen commented on DERBY-2998:

When I execute the "normal" query on a table without an index

ij> select * from (select row_number() as r, t.* from t) as tr where r < 2; 

With this query I get a BasicNoPutResultSet, that in turn uses the same BulkTableScanResultSet
for fetching the rows as the index query above.  However, BasicNoPutResultSet does not take
any restrictions into consideration at all. The execution is not stopped but continues on
with the full table scan. The restriction for the resultset is enforced at a higher level.

Two options stand out for moving this ahead:
extend the current BasicNoPutResultSet to take the restrictions (if any) into consideration.
A better approach might be to create a new NoPutResultSet subclass ("OLAPResultSet"?) that
will use the getNextRowCore() approach of IndexRowFromBaseRowResultSet. I have a hunch there
will be other scenarios where one would need an "OLAPResultSet" when we proceed with other
subtasks of the OLAP functionallity (DERBY-581), and this would probably give the lesser amount
of clutter to the existing ResultSet classes?

> 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: row_number_prototype-2c.diff, row_number_prototype-2c.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.

View raw message