db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yip Ng (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-883) Enhance GROUP BY clause to support expressions instead of just column references.
Date Fri, 28 Jul 2006 06:29:17 GMT
    [ http://issues.apache.org/jira/browse/DERBY-883?page=comments#action_12424010 ] 
Yip Ng commented on DERBY-883:

Hi Manish:

   I am also reviewing your DERBY-883 patch.  Since the group by clause has been relaxed to
allow expressions now, we'll need to return a proper SQLSTATE for invalid aggregate functions
use in group by clause.  i.e.:  The following test is throwing a NPE:
ij> create table t1 (c1 int, c2 varchar(10));
0 rows inserted/updated/deleted
ij> insert into t1 values (1, 'data1'), (2, 'data1'), (3, 'data2');
3 rows inserted/updated/deleted
ij> select sum(c1), 1 from t1 group by sum(c1);
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
ij> select * from t1;
ERROR 40XT0: An internal error was identified by RawStore module.

   I'll post additional comments after I have review all the changes.

> Enhance GROUP BY clause to support expressions instead of just column references.
> ---------------------------------------------------------------------------------
>                 Key: DERBY-883
>                 URL: http://issues.apache.org/jira/browse/DERBY-883
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions:
>         Environment: JDK 1.5.0_05
>            Reporter: Lluis Turro
>         Assigned To: Manish Khettry
>         Attachments: 883.patch.txt, 883.patch3.txt, 883.patch4.txt
> This select would return an error syntax on finding "(" after month if group by clause:
> select idissue, month(creation), year(creation), count(distinct idissue)
> where 
>   ....
> group by idissue, month(creation), year(creation)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message