db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2998) Add support for ROW_NUMBER() window function
Date Mon, 04 Feb 2008 19:47:08 GMT

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

A B commented on DERBY-2998:
----------------------------

Is there any kind of detailed write-up or functional spec for the approach that is being pursued
in the patches thus far (esp. d2998-9.diff)?  I took a look at:

  http://wiki.apache.org/db-derby/OLAPRowNumber

but the "proposed changes" section on that page is rather abbreviated.  In particular, a description
of how the query tree will look at various points during compilation (esp. 1) when created,
2) after preprocessing, and 3) after "modification of access paths"--i.e. just before code
generation) might be useful in trying to a) evaluate the approach, and b) offer feedback/suggestions
on the various issues that are occurring.  Also useful would be a simple example of the intended
compilation- and execution-time processing that should occur when ROW_NUMBER() is in play.

Apologies if the write-up already exists and I just missed it...

One quick comment from scanning d2998-9.diff: Can you explain the purpose of the following
change in SelectNode.java?

       /* Intentionally hide this.resultColumns */
       ResultColumnList    resultColumns = this.resultColumns.copyListAndObjects();

It appears to cause any RCL expression referenced by an outer query to fail with the same
error as what Rick reported for ROW_ORDER(), ex:

  ij> select * from (select i+j as x from hmm) a(x) where x > 0;
  ERROR XJ001: Java exception: 'ASSERT FAILED sourceResultSetNumber
  expected to be >= 0 for null.X

But that same statement succeeds if you remove the above lines.  Of course, if you remove
those lines then the simple ROW_ORDER() queries that work with d2998-9.diff applied stop working,
so something is amiss somewhere.  A writeup of what the intended behavior/query tree structure
is meant to be here might help...

> 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, d2998-5.diff, d2998-5.stat, d2998-6.diff,
d2998-6.stat, d2998-7.diff, d2998-7.stat, d2998-8.diff, d2998-8.stat, d2998-9-derby.log, d2998-9.diff,
d2998-9.stat, d2998-doc-1.diff, d2998-doc-1.stat, d2998-test.diff, d2998-test.stat, d2998-test2.diff,
d2998-test2.stat, d2998-test3.diff, d2998-test3.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