[
https://issues.apache.org/jira/browse/DERBY-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531077#comment-13531077
]
Bryan Pendleton commented on DERBY-6008:
----------------------------------------
I'm generally comfortable with the purpose of the patch, and with the approach
you've taken to
implement it. I don't see any reason not to proceed; it's a net improvement to
Derby, and we
can continue to test it in the trunk prior to releasing it in the next release.
Two comments on the proposed final patch:
1) It seems like there are tab-versus-space inconsistencies in the new code
w.r.t. its placement
in existing code. Not a big deal, but if it's easy to preserve the existing
tabification ...
2) There were parts of the patch where there were comments saying things like
"presumably
we've got a situation like this...", or "FIXME check if ..." Those sorts of
comments in a patch
seem like reminders to me of things I'd want to resolve before committing the
patch, so I
thought I'd check to see if they were things you wanted to fix prior to commit.
> Allow ORDER BY and FETCH/OFFSET in set operands
> -----------------------------------------------
>
> Key: DERBY-6008
> URL: https://issues.apache.org/jira/browse/DERBY-6008
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Attachments: derby-6008-a.diff, derby-6008-a.stat, derby-6008-b.diff,
> derby-6008-b.stat, derby-6008-c.diff, derby-6008-c.stat, derby-6008-d.diff,
> derby-6008-d.stat
>
>
> Currently, Derby doesn't allow ORDER BY nested in a set operand, e.g. in the
> following construct:
> (select i from t1 order by j offset 1 row) union
> (select i from t2 order by j desc offset 2 rows)
> This is allowed by the standard, as far as I can understand, cf. this quote
> from section 7.12 in SQL 2011:
> <query expression body> ::=
> <query term>
> | <query expression body> UNION [ ALL | DISTINCT ]
> [ <corresponding spec> ] <query term>
> | <query expression body> EXCEPT [ ALL | DISTINCT ]
> [ <corresponding spec> ] <query term>
> <query term> ::=
> <query primary>
> | <query term> INTERSECT [ ALL | DISTINCT ]
> [ <corresponding spec> ] <query primary>
> <query primary> ::=
> <simple table>
> | <left paren> <query expression body>
> [ <order by clause> ] [ <result offset clause> ] [ <fetch first clause>
> ] <right paren>
> I.e. the left paren chooses the second alternative in the production for
> <query primary>.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira