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

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

Two more nits:

LobMode.Accumulator.compareTo() doesn't satisfy the contract of 
Comparable.compareTo() in its handling of null values. It's supposed to throw 
NPE if the object is null, but the implemented method returns 1. Just removing 
the null check at the beginning of the method should be enough to make it 
satisfy the contract.

LobMode.terminate() would be more concise if it used the Collections.max() 
library method. Then we could also remove the SuppressWarnings annotation from 
the method, as we no longer needed an intermediate, weakly typed array 
representation of the accumulators. The body of the method could be as simple 
as return _accumulators.isEmpty() ? null : 
Collections.max(_accumulators.values()).getValue().

(Both of these comments also apply to the already existing GenericMode and 
ModeAggregate classes, by the way.)
                
> 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, 
> derby-672-03-ab-distinct.diff, derby-672-04-aa-fixJSR169test.diff, 
> derby-672-05-aa-java7testOrderProblem.diff, derby-672-06-aa-grantRevoke.diff, 
> derby-672-07-aa-fixJSR169again.diff, derby-672-08-aa-fixJSR169yetAgain.diff, 
> derby-672-09-ab-udtAggregates.diff, derby-672-10-af-typeBounds.diff, 
> derby-672-11-aa-tests.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

Reply via email to