db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DERBY-4397) Allow ORDER BY in subqueries
Date Mon, 16 Nov 2009 15:29:40 GMT

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

Dag H. Wanvik edited comment on DERBY-4397 at 11/16/09 3:28 PM:
----------------------------------------------------------------

Uploading an experimental patch (derby-4397-insert-from-exists) which

  - incorporates the revamped patch for DERBY-4
  - adds ORDER BY to FromSubqueries
  - adds ORDER BY to EXISTS/NOT EXISTS subqueries
  - adds test cases to the above as OrderByInSubqueries

The patch is by no means complete; only some subqueries are yet allowed (parser blocks others),
but the general approach should hopefully extend to the other kinds, since the code added
to
SubqueryNode is pretty generic. I just wanted to post this early in case anybody has input
on the general approach taken. 

      was (Author: dagw):
    Uploading an experimental patch (derby-4397-insert-from-exists) which
  - incorporate the revamped patch for DERBY-4
  - adds ORDER BY to FromSubqueries
  - adds ORDER BY to EXISTS/NOT EXISTS subqueries
  - adds test cases to the above as OrderByInSubqueries

The patch is by no means complete; only some subqueries are yet allowed (parser blocks others)
but the general approach should hopefully extend to the other kinds, since the code added
to
SubqueryNode is pretty generic. I just wanted to post this early in case anybody has input
on the general approach taken. 
  
> Allow ORDER BY in subqueries
> ----------------------------
>
>                 Key: DERBY-4397
>                 URL: https://issues.apache.org/jira/browse/DERBY-4397
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Dag H. Wanvik
>         Attachments: derby-4397-insert-from-exists.diff, derby-4397-insert-from-exists.stat,
orderBySpec.html, orderBySpec.html, orderBySpec.html
>
>
> SQL 2008 allows ORDER BY to be specified in subqueries. In conjunction with OFFSET/FETCH
and/or ROW_NUMBER
> meaningful subqueries with row ordering may be formulated. Cf. MySQL's LIMIT may be used
in subqueries as well.
> Note that OFFSET/FETCH is currently not allowed in subqueries, either.

-- 
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