db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2416) Provide a shell for a subclass of SQLChar which will use the passed Collator to do the collation rather than SQLChar's default collation of UCS_BASIC
Date Sat, 10 Mar 2007 00:42:09 GMT

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

Mamta A. Satoor commented on DERBY-2416:
----------------------------------------

Thanks, Dan, for your feedback. The shorter name does sound better. I will go ahead with CollatorSQLChar.
Just one last but about the name: I thought having a suffix rather than a prefix to "SQLChar"
would be better because that way it is easy to find all the variants of SQLChar in the org.apache.derby.iapi.types
package. 

As for requiring RuleBasedCollator, I had started out with requiring Collator rather than
RuleBasedCollator. I wanted to go the route of using Collator rather than RuleBasedCollator
so that any kind of Collator object could be used for collation with this new class. I reverted
to using RuleBasedCollator because getIntArray method uses RuleBasedCollator.getCollationElementIterator.
This method is defined on RuleBasedCollator and not on the Collator interface. 

I haven't given this much thought but maybe I can change getIntArray to see if Collator is
an instance of RuleBasedCollator and if yes then use getCollationElementIterator to find collation
elements otherwise throw an exception saying the passed Collator is not supported. In future,
as we add other types of Collator objects, we can modify getIntArray accordingly. This suggestion
is not based on lot of thinking but I thought I would throw it out on the list to see what
people thought.

As for your other comments about more meaningful names and javadoc, let me work on those in
my updated patch.

About the performance improvement, let me tackle that later in a subsequent patch so I can
think about it a little more. I will write it down in my todo list for this project.



> Provide a shell for a subclass of SQLChar which will use the passed Collator to do the
collation rather than SQLChar's default collation of UCS_BASIC
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2416
>                 URL: https://issues.apache.org/jira/browse/DERBY-2416
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>         Assigned To: Mamta A. Satoor
>         Attachments: DERBY2416_NewCharClassWithDifferentCollationSupport_diff_v1.txt,
DERBY2416_NewCharClassWithDifferentCollationSupport_stat_v1.txt
>
>
> This jira entry is one of the tasks involved in implementing DERBY-2336.
> The existing SQLChar datatype has the Derby's default collation which is UCS_BASIC defined
on them. With Derby 10.3, we want to support an additional collation for char datatypes which
will be based on the territory. This jira issue is the placeholder for creating subclass of
SQLChar which will use the passed Collator to do the collation. The current use of this class
in Derby 10.3 will be for territory based collation but this class can be used in future for
other kinds of collations like case-insensitive etc.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message