db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2557) Provide a new interface on DataValueFactory(DVF) called getNull(formatId, collationType) which returns a DVD with proper collation association.
Date Thu, 19 Apr 2007 15:00:15 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mamta A. Satoor updated DERBY-2557:
-----------------------------------

    Attachment: DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v2_stat.txt
                DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v2_diff.txt

Based on feedback from Dan, changing the implementation of the new interface DVF.getNull so
that it bypasses the InstanceGetter. This implementation is much simpler than the old one
because there is no InstanceGetter involved. The patch is attached as DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v2_diff.txt
I am running the tests and will commit the patch after successful runs of the tests.

The changes made in the patch are as follows
1)DataValueFactory
Changed the name of the new interface from getInstanceUsingFormatIdAndCollationType to getNull.
This interface now returns a DVD rather than an Object. The functionality of the interface
remains the same but the implementation has changed.
2)DataValueFactoryImpl
a)Removed the class level array and the code associated with InstanceGetter.
b)Added a new static method called getNullDVDWithUCS_BASICcollation(int formatId). This static
method handles all the format ids associated with DVDs with the exception of Decimals. The
class to be returned for Decimals depends on what VM is being used. This dependency on the
VM is handled by getNullDecimal defined on DVF. But since getNullDecimal is not a static method,
it can't be called by static method getNullDVDWithUCS_BASICcollation. I could go the path
of defining getNullDecimal as static but that will require changes in NumericTypeCompiler.nullMethodName
method. Also, all the other getNullXXX on DVF are non-static So, the code for returning the
right DVD for Decimal is not in getNullDVDWithUCS_BASICcollation. Rather it is in the calling
method, getNull. For other format ids associated with DVDs, getNull will check if the DVD
is of type StringDataValue and the collation type is territory based and if so, then it will
return ((StringDataValue)returnDVD).getValue(getCharacterCollator(collationType));
3)DTSClassInfo
This class now calls the static method in DVF to get the DVDs. But if the format id is not
for a DVD, then it checks if it needs to return TypeId.

I will go ahead and commit it after the tests run successfully. Does anyone have any comments
on the patch? 

> Provide a new interface on DataValueFactory(DVF) called getNull(formatId, collationType)
which returns a DVD with proper collation association. 
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2557
>                 URL: https://issues.apache.org/jira/browse/DERBY-2557
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>         Assigned To: Mamta A. Satoor
>         Attachments: DERBY2535_Return_Collator_api_On_DVD_v1_diff.txt, DERBY2535_Return_Collator_api_On_DVD_v1_stat.txt,
DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v1_diff.txt, DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v1_stat.txt,
DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v2_diff.txt, DERBY2557_getObject_Using_CollationType_FormatID_interface_on_DVF_v2_stat.txt
>
>
> Provide a new interface, called getInstanceUsingFormatIdAndCollationType(formatId, collationType)
on DVF. Store will call this interface to create empty DVD objects and then load these DVD
objects using readExternal. For performance efficiency, when Store needs more of the same
base DVD, then on subsequent needs, it will call DVD.getNewNull rather than calling DVF.getInstanceUsingFormatIdAndCollationType
again. This work is required for DERBY-2537.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message