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 Mike Matrigali <mi...@sbcglobal.net> on 2007/05/25 20:23:01 UTC

question about WorkHorseForCollatorDatatypes.java

Why is 5 a good magic number in the following comment, is there
some guarantee 5 more is always enough?:


/* Believe it or not, a String might have more
  * collation elements than characters.
  * So, we handle that case by increasing the int array
  * by 5 and copying array elements.
  */


Re: question about WorkHorseForCollatorDatatypes.java

Posted by Mike Matrigali <mi...@sbcglobal.net>.
It is not causing a problem in any current test I am writing,
I happened to be looking at the code to
track down a different issue and just did not understand the comment.
Without knowing how more collation elements than characters can happen
I could not figure out an appropriate test case.

Mamta Satoor wrote:
> Mike, I am not sure why 5 was picked:( This is what we did for national 
> datatypes and I just picked it from there. Is it causing a problem?
>  
> Mamta
> 
>  
> On 5/25/07, *Mike Matrigali* <mikem_app@sbcglobal.net 
> <ma...@sbcglobal.net>> wrote:
> 
>     Why is 5 a good magic number in the following comment, is there
>     some guarantee 5 more is always enough?:
> 
> 
>     /* Believe it or not, a String might have more
>     * collation elements than characters.
>     * So, we handle that case by increasing the int array
>     * by 5 and copying array elements.
>     */
> 
> 


Re: question about WorkHorseForCollatorDatatypes.java

Posted by Mamta Satoor <ms...@gmail.com>.
Mike, I am not sure why 5 was picked:( This is what we did for national
datatypes and I just picked it from there. Is it causing a problem?

Mamta


On 5/25/07, Mike Matrigali <mi...@sbcglobal.net> wrote:
>
> Why is 5 a good magic number in the following comment, is there
> some guarantee 5 more is always enough?:
>
>
> /* Believe it or not, a String might have more
> * collation elements than characters.
> * So, we handle that case by increasing the int array
> * by 5 and copying array elements.
> */
>
>