db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject Re: Collation derivation for UPPER etc. incorrect in wiki page?
Date Tue, 04 Sep 2007 20:44:27 GMT
I looked at TernaryOperatorNode for TRIM, SUBSTR and we are correctly using
the collation derivation of the operand rather than always setting the
result's collation derivation to implicit. For UPPER and LOWER, I checked
SimpleStringOperatorNode and again, we are correctly using the collation
derivation of operand rather than always setting the result's collation
derivation to implicit.

I will go ahead and fix the wiki page.

thanks for catching this,
Mamta


On 9/4/07, Daniel John Debrunner <djd@apache.org> wrote:
>
> Rule 5) in the collation wiki page says:
> -------------------------------------------------------------------
> 5)Result character string types from UPPER, LOWER, TRIM(LTRIM, RTRIM),
> SUBSTR will have the same collation as their operand. This comes from
> SQL spec Section 6.29 <string value function> Syntax Rules 8, 8, 11d, 4
> respectively). The collation derivation will be implicit.
> -------------------------------------------------------------------
>
> http://wiki.apache.org/db-derby/BuiltInLanguageBasedOrderingDERBY-1478
>
> I don't see where the last sentence comes from: "The collation
> derivation will be implicit.".
>
> That doesn't seem to be correct, if the operand has collation explicit
> or none shouldn't that be carried through to the result of the character
> string function? The rules in 6.29 that are quoted by 5) above just say
> the type is the type of the operand which includes the derivation,
> right? I don't see anything in 6.29 about asserting implicit derivation.
>
> I haven't looked at the code to see what is implemented, just wanted to
> raise this as a possible issue.
>
> Dan.
>

Mime
View raw message