[
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-01-aa-ddl.diff
Attaching derby-672-01-aa-ddl.diff. This patch adds CREATE and DROP ddl for
user-defined aggregates, including dblook support and upgrade tests. I am
running full regression tests now.
This patch adds support for the following two DDL statements:
CREATE DERBY AGGREGATE [ schemaName. ] SQL92Identifier
FOR ValueDataType
[ RETURNS ReturnDataType ]
EXTERNAL NAME ClassNameString
and
DROP DERBY AGGREGATE [ schemaName. ] SQL92Identifier RESTRICT
I have gone to some trouble to prevent name collisions between user-defined
aggregates and 1-arg functions. That work may be useful when we address
DERBY-5901.
Touches the following files:
--------------
M java/engine/org/apache/derby/iapi/sql/depend/DependencyManager.java
M java/engine/org/apache/derby/iapi/sql/dictionary/AliasDescriptor.java
M java/engine/org/apache/derby/iapi/sql/dictionary/PermDescriptor.java
M java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java
M java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java
M java/engine/org/apache/derby/catalog/AliasInfo.java
A java/engine/org/apache/derby/catalog/types/AggregateAliasInfo.java
M java/engine/org/apache/derby/impl/sql/catalog/SYSALIASESRowFactory.java
A user-defined aggregate is implemented as a kind of Java alias, like SQL
routines and UDTs.
--------------
M java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
M java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
M java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
M
java/engine/org/apache/derby/impl/sql/execute/CreateAliasConstantAction.java
Actual DDL support. Introduces 2 new non-reserved keywords: DERBY and AGGREGATE.
--------------
M java/tools/org/apache/derby/loc/toolsmessages.properties
M java/engine/org/apache/derby/loc/messages.xml
M java/shared/org/apache/derby/shared/common/reference/SQLState.java
New error messages introduced by the new DDL.
--------------
M java/tools/org/apache/derby/tools/dblook.java
M java/tools/org/apache/derby/impl/tools/dblook/DB_Alias.java
Tool support for re-creating aggregate DDL when dumping a database.
--------------
M java/testing/org/apache/derbyTesting/junit/JDBC.java
Support for dropping aggregates when scouring out schemas inbetween regression
test cases.
--------------
A
java/testing/org/apache/derbyTesting/functionTests/tests/lang/UserDefinedAggregatesTest.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_10.java
M
java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_makeDB_2.sql
M
java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out
M
java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
New regression tests for basic aggregate DDL, dblook, and upgrade.
> 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, 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira