db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-672) Re-enable user defined aggregates
Date Fri, 31 Aug 2012 14:16:07 GMT

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

Rick Hillegas updated DERBY-672:
--------------------------------

    Attachment: derby-672-03-aa-distinct.diff

Attaching derby-672-03-aa-distinct.diff. This patch adds support for invoking DISTINCT user-defined
aggregates in the SELECT list. I am running regression tests now.

Touches the following files:

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

M       java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

New parser production for DISTINCT user-defined aggregate invocations. When looking for function
invocations, we also look for DISTINCT user-defined aggregate invocations. If we find one,
we return an AggregateNode rather than a StaticMethodCallNode.

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

M       java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
M       java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java

Bind-time support for AggregateNodes which were created by the new parser production.

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

M       java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java

Fixes a casting error in the runtime logic for user-defined aggregates. The cast occurs in
the merge() processing, which is tickled by DISTINCT aggregates.

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

M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java

New test cases.

                
> Re-enable user defined aggregates
> ---------------------------------
>
>                 Key: DERBY-672
>                 URL: https://issues.apache.org/jira/browse/DERBY-672
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-672-01-aa-ddl.diff, derby-672-02-ac-nonDistinct.diff, derby-672-03-aa-distinct.diff,
UserDefinedAggregates.html, UserDefinedAggregates.html
>
>
> Nicolas Dufour in an email thread titled "functions and list" started on November 2,
2005 requests the ability to create user defined aggregates.
> This functionality used to be in Cloudscape. It was disabled presumably because it was
considered non-standard. However, most of the machinery needed for this feature is still in
the code. We should re-enable user defined aggregates after we agree on acceptable syntax.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message