[
https://issues.apache.org/jira/browse/DERBY-2723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mamta A. Satoor closed DERBY-2723.
----------------------------------
Resolution: Fixed
Fix Version/s: 10.3.0.0
Commited changes for this Jira entry using revision 547206
The commit comments are as follows
DERBY-2723
The RoutineAliasInfo for user defined function stores the collation infomraiton
about it's return type and parameters if they happen to be character string
type. This commit makes sure that for those DTDs, we use the collation of the
schema in which the function is getting defined. The existing code creates
these DTDs at the parse time but the SchemaDescriptor for the function is not
available at that stage. To get around this, at the bind time, we check in
CreateAliasNode if we are dealing with any character string types in the
function definition. If yes, then we create new DTDs which are based on the
ones created during the parse time, but we set the correct collation
informaiton on them. And then we recreate a new RoutineAliasInfo using the
infomration from parse time RoutineAliasInfo and the newly created DTDs. I have
added a CREATE FUNCTION using character string types in CollationTest. Code to
use this collation information correctly when the function gets used inside a
sql will go in as a separate patch.
> Set correct collation type and derivation for result from user defined
> functions' that return character string type.
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2723
> URL: https://issues.apache.org/jira/browse/DERBY-2723
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 10.3.0.0
> Reporter: Mamta A. Satoor
> Assignee: Mamta A. Satoor
> Fix For: 10.3.0.0
>
>
> As per the wiki page
> http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478,
> assign correct collation type for results of user defined functions. The rule
> as copied from the wiki page is as follows
> 7)For user defined functions' that return character string type, the return
> type's collation will have the same collation as of the character set of the
> schema that the function is defined in. The collation derivation will be
> implicit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.