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/30 20:13:07 UTC

DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Hi,

I am working on putting the correct collation type and derivation for DTDs.
The approach I am taking is to change all the constructors for DTDs to
accept the collation type and derivation. It will be the responsibility of
the caller of the DTD constructor to pass this information for all different
kinds of DTDs, ie whether the DTD is for collation sensitive datatypes
(which include the character string datatypes), or all the other
non-collation sensitive datatypes (eg numeric, binary etc,). For non
collation sensitive datatypes, the caller will pass collation derivation of
"none" which will mean that collation type of such datatypes should be
ignored.

I just wanted to bring it to community's attention that this approach of
changing the DTD constructor signature is requiring lot of changes since all
the callers now have to taken on the task of passing the collation type and
derivation. I think that is the right approach ie have callers take on the
responsibility of associating the collation types and derivations for their
DTDs. Let me know if anyone has any feedback on how I am approaching this.

thanks,
Mamta

Re: DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Posted by Mamta Satoor <ms...@gmail.com>.
Mike, I have attached the partial DTD constrcutor changes patch to
DERBY-2599.

Mamta


On 4/30/07, Mamta Satoor <ms...@gmail.com> wrote:
>
> Yes, I have some work done in my codeline. I will post that partial change
> to DERBY-2599.
>
> thanks,
> Mamta
>
>
>  On 4/30/07, Mike Matrigali <mi...@sbcglobal.net> wrote:
> >
> >
> >
> > Mamta Satoor wrote:
> > > Hi,
> > >
> > > I am working on putting the correct collation type and derivation for
> > > DTDs. The approach I am taking is to change all the constructors for
> > > DTDs to accept the collation type and derivation. It will be the
> > > responsibility of the caller of the DTD constructor to pass this
> > > information for all different kinds of DTDs, ie whether the DTD is for
> > > collation sensitive datatypes (which include the character string
> > > datatypes), or all the other non-collation sensitive datatypes (eg
> > > numeric, binary etc,). For non collation sensitive datatypes, the
> > caller
> > > will pass collation derivation of "none" which will mean that
> > collation
> > > type of such datatypes should be ignored.
> > >
> > > I just wanted to bring it to community's attention that this approach
> > of
> > > changing the DTD constructor signature is requiring lot of changes
> > since
> > > all the callers now have to taken on the task of passing the collation
> >
> > > type and derivation. I think that is the right approach ie have
> > callers
> > > take on the responsibility of associating the collation types and
> > > derivations for their DTDs. Let me know if anyone has any feedback on
> > > how I am approaching this.
> > >
> > Have you done any of this work yet, if so could you post a partial patch
> > as an example of the kinds of changes you are proposing.  I don't expect
> > a completed work, just something to get a feel of the type of changes.
> >
> > > thanks,
> > > Mamta
> >
> >
>

Re: DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Posted by Mamta Satoor <ms...@gmail.com>.
Yes, I have some work done in my codeline. I will post that partial change
to DERBY-2599.

thanks,
Mamta


On 4/30/07, Mike Matrigali <mi...@sbcglobal.net> wrote:
>
>
>
> Mamta Satoor wrote:
> > Hi,
> >
> > I am working on putting the correct collation type and derivation for
> > DTDs. The approach I am taking is to change all the constructors for
> > DTDs to accept the collation type and derivation. It will be the
> > responsibility of the caller of the DTD constructor to pass this
> > information for all different kinds of DTDs, ie whether the DTD is for
> > collation sensitive datatypes (which include the character string
> > datatypes), or all the other non-collation sensitive datatypes (eg
> > numeric, binary etc,). For non collation sensitive datatypes, the caller
> > will pass collation derivation of "none" which will mean that collation
> > type of such datatypes should be ignored.
> >
> > I just wanted to bring it to community's attention that this approach of
> > changing the DTD constructor signature is requiring lot of changes since
> > all the callers now have to taken on the task of passing the collation
> > type and derivation. I think that is the right approach ie have callers
> > take on the responsibility of associating the collation types and
> > derivations for their DTDs. Let me know if anyone has any feedback on
> > how I am approaching this.
> >
> Have you done any of this work yet, if so could you post a partial patch
> as an example of the kinds of changes you are proposing.  I don't expect
> a completed work, just something to get a feel of the type of changes.
>
> > thanks,
> > Mamta
>
>

Re: DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Posted by Mike Matrigali <mi...@sbcglobal.net>.

Mamta Satoor wrote:
> Hi,
>  
> I am working on putting the correct collation type and derivation for 
> DTDs. The approach I am taking is to change all the constructors for 
> DTDs to accept the collation type and derivation. It will be the 
> responsibility of the caller of the DTD constructor to pass this 
> information for all different kinds of DTDs, ie whether the DTD is for 
> collation sensitive datatypes (which include the character string 
> datatypes), or all the other non-collation sensitive datatypes (eg 
> numeric, binary etc,). For non collation sensitive datatypes, the caller 
> will pass collation derivation of "none" which will mean that collation 
> type of such datatypes should be ignored.
>  
> I just wanted to bring it to community's attention that this approach of 
> changing the DTD constructor signature is requiring lot of changes since 
> all the callers now have to taken on the task of passing the collation 
> type and derivation. I think that is the right approach ie have callers 
> take on the responsibility of associating the collation types and 
> derivations for their DTDs. Let me know if anyone has any feedback on 
> how I am approaching this.
>  
Have you done any of this work yet, if so could you post a partial patch
as an example of the kinds of changes you are proposing.  I don't expect 
a completed work, just something to get a feel of the type of changes.

> thanks,
> Mamta


Re: DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Posted by Mamta Satoor <ms...@gmail.com>.
Currently, TypeDescriptorImpl has collation derivation of "implicit". I was
thinking that although it does not apply to non-collation sensitive
datatypes, it should be set to "none", but maybe it doesn't matter because
for non-collation sensitive datatypes, noone should worry about collation
derivation. So, if we decide on having collation type of "implicit" for
non-collation sensitive datatypes, then I guess we don't need to worry about
collation settings when such DTDs get created.

Also, Dan, I am assuming when you say setCollation(), you mean
setCollationType and setCollationDerivation methods on DTD. If we do want to
rely on those 2 methods rather than the DTD constructor, then I am
thinking that we should default the collation type to be UCS_BASIC on
TypeDescriptorImpl (right now, it is not initialized to anything). That way,
only character types with a possibility of TERRITORY_BASED/UCS_BASIC
collation will call setCollationType. But places like
DataDictionaryImpl.create_SYSCS_procedures, where we known collation type
can only be UCS_BASIC will not have to call setCollationType.

If this sounds fine, i will start looking at using setCollationType method
vs constructor.

Mamta

On 4/30/07, Daniel John Debrunner <dj...@apache.org> wrote:
>
> Mamta Satoor wrote:
> > Hi,
> >
> > I am working on putting the correct collation type and derivation for
> > DTDs. The approach I am taking is to change all the constructors for
> > DTDs to accept the collation type and derivation. It will be the
> > responsibility of the caller of the DTD constructor to pass this
> > information for all different kinds of DTDs, ie whether the DTD is for
> > collation sensitive datatypes (which include the character string
> > datatypes), or all the other non-collation sensitive datatypes (eg
> > numeric, binary etc,). For non collation sensitive datatypes, the caller
> > will pass collation derivation of "none" which will mean that collation
> > type of such datatypes should be ignored.
> >
> > I just wanted to bring it to community's attention that this approach of
> > changing the DTD constructor signature is requiring lot of changes since
> > all the callers now have to taken on the task of passing the collation
> > type and derivation. I think that is the right approach ie have callers
> > take on the responsibility of associating the collation types and
> > derivations for their DTDs. Let me know if anyone has any feedback on
> > how I am approaching this.
>
> Why not just a setCollation() method?
>
> Dan.
>
>

Re: DERBY-1478 Lineitem DERBY-2599: Associating correct collation type and derivation with DTD

Posted by Daniel John Debrunner <dj...@apache.org>.
Mamta Satoor wrote:
> Hi,
>  
> I am working on putting the correct collation type and derivation for 
> DTDs. The approach I am taking is to change all the constructors for 
> DTDs to accept the collation type and derivation. It will be the 
> responsibility of the caller of the DTD constructor to pass this 
> information for all different kinds of DTDs, ie whether the DTD is for 
> collation sensitive datatypes (which include the character string 
> datatypes), or all the other non-collation sensitive datatypes (eg 
> numeric, binary etc,). For non collation sensitive datatypes, the caller 
> will pass collation derivation of "none" which will mean that collation 
> type of such datatypes should be ignored.
>  
> I just wanted to bring it to community's attention that this approach of 
> changing the DTD constructor signature is requiring lot of changes since 
> all the callers now have to taken on the task of passing the collation 
> type and derivation. I think that is the right approach ie have callers 
> take on the responsibility of associating the collation types and 
> derivations for their DTDs. Let me know if anyone has any feedback on 
> how I am approaching this.

Why not just a setCollation() method?

Dan.