db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3613) SELECT DISTINCT field FROM TABLE_NAME GROUP BY field, field2
Date Tue, 22 Apr 2008 02:39:21 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bryan Pendleton updated DERBY-3613:

    Attachment: dontGenerateForDistinct.diff

Attached is 'dontGenerateForDistinct.diff', a patch proposal.

This patch modifies the processing of GROUP BY columns
which are "generated" into the select's result column list.
Specifically, the patch causes columns to be generated
into the select RCL only if the select does *not* specify DISTINCT.

If the select specifies DISTINCT, we don't want to include
any additional columns into the RCL because we want to
be sure that we only perform DISTINCT processing on
the columns that were specified by the user.

The patch also includes some additional test cases, based
on the repro case in the issue description.

I ran a complete set of regression tests with the modified code
and it passed all the existing tests, as well as the new tests
added by this patch.

Please have a look and let me know what you think.

> -------------------------------------------------------------
>                 Key: DERBY-3613
>                 URL: https://issues.apache.org/jira/browse/DERBY-3613
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions:
>         Environment: Windows XP
>            Reporter: Artur Kuś
>            Assignee: Bryan Pendleton
>         Attachments: dontGenerateForDistinct.diff
> 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.

View raw message