db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "BuiltInLanguageBasedOrderingDERBY-1478" by MamtaSatoor
Date Mon, 02 Apr 2007 03:25:47 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by MamtaSatoor:
http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478

------------------------------------------------------------------------------
  
  5)WorkHorseForCollatorDatatypes should override all the collation related methods so that
it uses the non-default Collator. All the non-default-collation-sensitive classes have an
instance of WorkHorseForCollatorDatatypes which is used to call the collation related methods.
This ensures that these collation related methods are implemented in one central place rather
than in all the collation-sensitive classes. 
  
+ 6)At compile time, make sure that the correct character class (ex SQLChar vs CollatorSQLChar)
is generated so at run time, we do not need to check what kind of Collator object need to
be used for character types. It should be all handled correctly at the code generation time
and the appropriate runtime methods (ex like method in SQLChar vs like method in WorkHorseForCollatorDatatypes)
should get called. This is the biggest unknown to me at this point and I need to do more research.
Will appreicate very much if someone has some thoughts on this.
  
  Store changes
  
@@ -90, +91 @@

  
  1)CollatorSQLChar has a method called getCollationElementsForString which currently gets
called by like method. getCollationElementsForString gets the collation elements for the value
of CollatorSQLChar class. But say like method is looking for pattern 'A%' and the value of
CollatorSQLChar is 'BXXXXXXXXXXXXXXXXXXXXXXX'. This is eg of one case where it would have
been better to get collation element one character of CollatorSQLChar value at a time so we
don't go through the process of getting collation elements for the entire string when we don't
really need. This is a performance issue and could be taken up at the end of the implementation.
Comments on this from Dan and Dag can be found in DERBY-2416. 
  
+ Testing
+ 
- 12)Add tests for this feature. This a broad umbrella task but I do want to mention 3 specific
tests that we should be testing
+ 1)Add tests for this feature. This a broad umbrella task but I do want to mention 3 specific
tests that we should be testing
  
  a)For both a newly created 10.3 database and an upgraded 10.3 database, make sure that metadata
continues to show the scale for character datatypes as 0 (rather than the collation type value).
That is, test that the scale of the character datatypes is always 0 and it didn't get impacted
negatively by the overloading of scale field as collation type in TypeDescriptor.
  
@@ -98, +101 @@

  
  c)CREATE VIEW should have collation type UCS_BASIC/TERRIOTRY_BASED assocatied with it's
character columns. The exact collation will be determined by what is the value of the COLLATION
attribute. This is same as what would happen for CREATE TABLE. Have a test for global temporary
tables with character colums too.
  
+ Miscellaneous item
- 13)Make sure the space padding at the end of various character datatypes is implemented
commented correctly in javadocs. This padding is used in collation related methods. For eg
check SQLChar.stringCompare method.
+ 1)Make sure the space padding at the end of various character datatypes is implemented commented
correctly in javadocs. This padding is used in collation related methods. For eg check SQLChar.stringCompare
method.
  
  == Implemented items ==
  1)Subclasses with non-default-collation have been implemented for character types SQLChar,
SQLVarchar, SQLLongvarchar and SQLClob. The new subcalsses are called CollatorSQLChar, CollatorSQLVarchar,
CollatorSQLLongvarchar and CollatorSQLClob, respectively. They reside in derby.iapi.types
package. This work was done by revisions 516864, 516869 and 518479, 524545.

Mime
View raw message