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-3613) SELECT DISTINCT field FROM TABLE_NAME GROUP BY field, field2
Date Mon, 14 Apr 2008 15:01:04 GMT

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

Knut Anders Hatlen commented on DERBY-3613:
-------------------------------------------

The first change (two rows --> one row) happened in this commit:

------------------------------------------------------------------------
r267239 | bandaram | 2005-09-02 20:07:39 +0200 (Fri, 02 Sep 2005) | 6 lines

DERBY-504: Disable pushing down DISTINCT when number of columns from the parent query and
the subquery don't match. Can lead to wrong results.

Thanks to Rick for persistant reviews and running the tests.

Submitted by Knut Anders Hatlen (Knut.Hatlen@Sun.COM)

------------------------------------------------------------------------


The old behaviour (one row --> two rows) was reintroduced in this commit:

------------------------------------------------------------------------
r516454 | abrown | 2007-03-09 17:37:20 +0100 (Fri, 09 Mar 2007) | 8 lines

DERBY-681: Remove the "wrap group by's in a subselect" rewrite in the parser.
This patch preserves the having clause through bind and optimize phases and
then, during the final rewrite for aggregates in the GroupByNode, it transforms
the having clause to a valid restriction. See text file attached to the Jira
for more information.

Contributed by Manish Khettry (manish_khettry@yahoo.com)

------------------------------------------------------------------------

> SELECT DISTINCT field FROM TABLE_NAME GROUP BY field,  field2
> -------------------------------------------------------------
>
>                 Key: DERBY-3613
>                 URL: https://issues.apache.org/jira/browse/DERBY-3613
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.2.1
>         Environment: Windows XP
>            Reporter: Artur Kuś
>
> Query 'SELECT DISTINCT field FROM TABLE_NAME GROUP BY field,  field2'  not work ok.
>  Distinct is ignored !!!

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