You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mamta Satoor <ms...@gmail.com> on 2007/04/16 23:44:17 UTC

In TypeDescriptorImpl, collationDerivation probably should default to "implicit" rather than "none".

Hi,

There was some discussion earlier about setting TypeDescriptorImpl's
collationDerivation field to
StringDataValue.COLLATION_DERIVATION_NONE(which in SQL Spec language
means none). I can dig that mail out if anyone
needs it for the background information.

While working on language based ordering, what I am finding is all the
TypeDescriptors related to character data types should have the collation
derivation of implicit with the exception of TypeDescriptors corresponding
to aggregate methods (as mentioned on the wiki page
http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478 Section
Collation Determination point 11.)

So, my question is wouldn't it be better for us to start out with
collationDerivation of implicit and make it the job of aggregate methods to
set the collation to none if they are dealing with operands of different
collation types?

Pros of setting collation derivation to implicit
1)Less code change will be required because majority of the places where the
TypeDescriptorImpl is created for character types, we want the collation
derivation to be implicit.

Cons of setting collation derivation to implicit
1)We shouldn't miss places where the collation derivation should be none
rather than the default of implicit.

Based on this, does anyone have objections to me changing the default of
TypeDescriptorImpl's collationDerivation field to implicit?

Thanks,
Mamta