db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3002) Add support for GROUP BY ROLLUP
Date Fri, 18 Sep 2009 11:21:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757114#action_12757114

Knut Anders Hatlen commented on DERBY-3002:

I haven't had time to look at the patch yet, but I finally found some
time to check what the SQL:2003 standard says about ROLLUP. What I
noticed was that the syntax was somewhat more complex than what the
patch implements. A <rollup list> is a <grouping element>, and a
<group by clause> takes a a <grouping element list> which may contain
many <grouping element>s. So if I understand the syntax correctly,
these GROUP BY clauses should be allowed:



I haven't checked what these clauses actually mean, though.

There's also an example in the syntax rules with another variation
that's not accepted by the current patch:

> NOTE 137 — (...) For example, "ROLLUP ( (A, B), (C, D) )" is
> equivalent to "GROUPING SETS ( (A, B, C, D), (A, B), () )".

I think it is OK to support just a subset of what the standard allows,
but we should probably try to find out what the non-supported syntax
means and if it is possible to fit it into the current approach

(Plain non-rollup group bys are also more restrictive in Derby than in
the standard. For instance, the standard allows constructs like GROUP
BY (a, b), and GROUP BY a, (b, c), and even GROUP BY (), which are not
accepted by Derby.)

> Add support for GROUP BY ROLLUP
> -------------------------------
>                 Key: DERBY-3002
>                 URL: https://issues.apache.org/jira/browse/DERBY-3002
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Bryan Pendleton
>            Assignee: Bryan Pendleton
>            Priority: Minor
>         Attachments: fixWhiteSpace.diff, IncludesASimpleTest.diff, passesRegressionTests.diff,
prototypeChangeNoTests.diff, rewriteGroupByRS.diff, rollupNullability.diff, UpdateToTrunkSep2009.diff,
useAggregateObserver.diff, useLookahead.diff
> Provide an implementation of the ROLLUP form of multi-dimensional grouping according
to the SQL standard.
> See http://wiki.apache.org/db-derby/OLAPRollupLists for some more detailed information
about this aspect of the SQL standard.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message