Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 97638 invoked from network); 6 Apr 2009 13:15:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Apr 2009 13:15:34 -0000 Received: (qmail 66560 invoked by uid 500); 6 Apr 2009 13:15:34 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 66510 invoked by uid 500); 6 Apr 2009 13:15:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 66502 invoked by uid 99); 6 Apr 2009 13:15:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 13:15:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2009 13:15:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E7FCA234C003 for ; Mon, 6 Apr 2009 06:15:12 -0700 (PDT) Message-ID: <1738992830.1239023712934.JavaMail.jira@brutus> Date: Mon, 6 Apr 2009 06:15:12 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3002) Add support for GROUP BY ROLLUP In-Reply-To: <8295663.1186932103844.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696072#action_12696072 ] Knut Anders Hatlen commented on DERBY-3002: ------------------------------------------- One more comment after testing the patch (yes, it still applies cleanly on trunk!): The patch doesn't make ROLLUP a reserved keyword, so we can still have columns with that name (which is good, I think). But we cannot group by a column named ROLLUP without quoting the column name: ij> create table t2(rollup int, x int); 0 rows inserted/updated/deleted ij> select rollup, sum(x) from t2 group by rollup; ERROR 42X01: Syntax error: Encountered "" at line 1, column 45. Issue the 'help' command for general information on IJ command syntax. Any unrecognized commands are treated as potential SQL commands and executed directly. Consult your DBMS server reference documentation for details of the SQL syntax supported by your server. ij> select rollup, sum(x) from t2 group by "ROLLUP"; ROLLUP |2 ----------------------- 0 rows selected I think this small incompatibility could be avoided by adding a lookahead in the grammar so that we only try to parse it as a multi-level grouping clause if ROLLUP is followed by a left parenthesis. > Add support for GROUP BY ROLLUP > ------------------------------- > > Key: DERBY-3002 > URL: https://issues.apache.org/jira/browse/DERBY-3002 > Project: Derby > Issue Type: Sub-task > Components: SQL > Affects Versions: 10.4.1.3 > Reporter: Bryan Pendleton > Assignee: Bryan Pendleton > Priority: Minor > Attachments: IncludesASimpleTest.diff, prototypeChangeNoTests.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.