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 ------------------------------------------------------------------------------ 1)When a character column is added using CREATE TABLE/ALTER TABLE, make sure that the correct collate type is populated in the TypeDescriptor's scale field in the SYS.SYSCOLUMNS table. In order to do this, CREATE TABLE/ALTER TABLE need to get their schema descriptor's collation type. The collation type of the schema descriptor will decide the collation type of the character columns defined in CREATE TABLE/ALTER TABLE. This comes from item 2 under Collation Determination section on this page. ALTER TABLE changes should work for both ADD COLUMN and MODIFY character column increase length. Part of the code changes required for this item has gone in revision 526385 and 526454 as part of DERBY-2530. Some more language changes and some store changes need to go in for this task to finish. Those changes involve passing the collation type from language to the store layer as part of CREATE TABLE and ALTER TABLE. Mike is planning to look into that. - 2)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. - - 3)Store needs a way to determine the collation type for a given DVD. This collation type will then be saved in the column metadata. Provide the api on DVD to return the correct collation type. + 2)Store needs a way to determine the collation type for a given DVD. This collation type will then be saved in the column metadata. Provide the api on DVD to return the correct collation type. '''[[GetText(Question)]]''' Will there be an api like DVD.getCollationType()? - 4)Cleanup the new interface DTD.comparable to use isXXX methods rather than looking for StoredFormatIds. DERBY-2569 + 3)Cleanup the new interface DTD.comparable to use isXXX methods rather than looking for StoredFormatIds. DERBY-2569 '''[[GetText(Store changes)]]''' @@ -185, +183 @@ 5)WorkHorseForCollatorDatatypes overrides 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. + '''[[GetText(Code Generation)]]''' + + 1)At compile time, we 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 is all handled at the code generation time and the appropriate runtime methods (ex like method in SQLChar vs like method in WorkHorseForCollatorDatatypes) get called at runtime. The changes for this went in as part of DERBY-2583. + '''[[GetText(Data Dictionary)]]''' 1)Set the correct collation type in SchemaDescriptor. On this page, Section Collation Determination, item 2) says that column definitions pick up their collation from the schema that they are defined in. In order for that to happen, schema should have the right collaiton type associated with it. This work of attaching right collation type to a schema went in as part of DERBY-2528 with revision 526237, 526243 and 526313.