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 Wed, 31 Oct 2007 11:30:55 GMT

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

Thomas Nielsen commented on DERBY-2998:

Where would the best place be to insert/use/introduce the OLAPResultSet?
- in sqlgrammar.jj, when we add the RowNumberColumnNode we could also add an "umbrella" OLAPResultSetNode
to the resultset?
- in ProjectRestrictNode.modifyAccessPath(), once the optimizer selects the best access path
to the data?
- any other place I've missed?

Index based queries run the second option and will insert an IndexToBaseRowNode in the querytree
during optimization if an index is present and will be used for accessing the rows. This ends
up  generating the IndexRowToBaseRowResultSet bytecode.
Ordering queries use the first option (if I'm not mistaken), and insert a OrderByNode during
querytree generation, ending up in the proper flagging of the existing resultset as ordered.

I know upfront that I will need a OLAPResultSet, so it might be appropriate to just add one
in sqlgrammar.jj? But then again it might be irrelvant so I should add it at optimizing?

Any input appreciated!

> 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