Changes between Version 6 and Version 7 of FDORfc55


Ignore:
Timestamp:
01/14/11 14:31:35 (14 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc55

    v6 v7  
    1 = FDO RFC 55 - Convert FdoDecimal(p,0) datatype to FdoInt32 for SHP Provider =
     1= FDO RFC 55 - Convert !FdoDecimal(p,0) datatype to FdoInt32 for SHP Provider =
    22
    33This page contains an change request (RFC) for the FDO Open Source project. 
     
    2828
    2929The motivation is well explained by:
    30 Ticket #365 [SHP Provider]: When executing IApplySchema, Int32 properties are converted to Decimal properties
     30Ticket #365 [SHP Provider]: When executing IApplySchema, !Int32 properties are converted to Decimal properties
    3131http://trac.osgeo.org/fdo/ticket/365
    3232
    33       >> If you execute an IApplySchema on a SHP connection. Any Int32 properties in any class definitions inside the schema (to be applied) will be converted to Decimal properties once the schema has been applied. This does not happen if the Int32 property happens to be an Identity property. <<
     33      >> If you execute an IApplySchema on a SHP connection. Any Int32 properties in any class definitions inside the schema (to be applied) will be converted to Decimal properties once the schema has been applied. This does not happen if the !Int32 property happens to be an Identity property. <<
    3434
    35 For further clarification "will be converted to Decimal properties" refer to FdoDecimal properties.
     35For further clarification "will be converted to Decimal properties" refer to !FdoDecimal properties.
    3636
    37 Note storing FdoInt32 as Decimals is expected since by specification DBF files natively do not have an integer type, but only DECIMAL(precision, scale) datatype. The same apply to double and single precision datatypes. Hence a FdoInt32 is mapped to a DECIMAL(11, 0) column type.
     37Note storing !FdoInt32 as Decimals is expected since by specification DBF files natively do not have an integer type, but only DECIMAL(precision, scale) datatype. The same apply to double and single precision datatypes. Hence a !FdoInt32 is mapped to a DECIMAL(11, 0) column type.
    3838
    39 The impact is on Describe Schema when currently a FdoDecimal is returned for a DECIMAL column even in the cases when the scale is zero and most probably the original type was a FdoInt32.
     39The impact is on Describe Schema when currently a !FdoDecimal is returned for a DECIMAL column even in the cases when the scale is zero and most probably the original type was a !FdoInt32.
    4040
    41 This RFC is required since reading back a FdoInt32 instead of a FdoDecimal is a change in behavior.
     41This RFC is required since reading back a !FdoInt32 instead of a !FdoDecimal is a change in behavior.
    4242
    4343== Proposed Solution ==
     
    4545Modify the FDO SHP provider:
    4646
    47     * the DBF to FDO datatype mapping (physical to logical conversion) needs a small refinement. In the case of DECIMAL(precision, scale) check the scale value. When the scale is 0 (zero) then return an FdoInt32 rather than an FdoDecimal. Note SHP doesn't support FdoInt64 or FdoInt16 datatypes therefore the mapping to FdoInt32 is unique.
     47    * the DBF to FDO datatype mapping (physical to logical conversion) needs a small refinement. In the case of DECIMAL(precision, scale) check the scale value. When the scale is 0 (zero) then return an !FdoInt32 rather than an !FdoDecimal. Note SHP doesn't support !FdoInt64 or !FdoInt16 datatypes therefore the mapping to !FdoInt32 is unique.
    4848
    4949 == Implications ==
    5050
    51      * In the case of physical DECIMAL(precision, scale) column the corresponding logical FDO property type will be set according to the scale. The caller must expect either a FdoDecimal or a FdoInt32 when reading a SHP schema.
     51     * In the case of physical DECIMAL(precision, scale) column the corresponding logical FDO property type will be set according to the scale. The caller must expect either a !FdoDecimal or a !FdoInt32 when reading a SHP schema.
    5252
    53     * This is a behavior change for the SHP provider. Before this change, SHP would return only FdoDecimal for all numerical FDO types. It would never return an Int32 except for the identity property (which actually is not stored).
     53    * This is a behavior change for the SHP provider. Before this change, SHP would return only !FdoDecimal for all numerical FDO types. It would never return an !Int32 except for the identity property (which actually is not stored).
    5454
    55     * The provider will return a FdoInt32 even for properties which originally were DECIMAL(p, 0). This issue can be mitigated by noting the SHP provider already does silent corrections on the fly in certain cases, like truncating the property names when found too long (both on reading and writing).
     55    * The provider will return a !FdoInt32 even for properties which originally were DECIMAL(p, 0). This issue can be mitigated by noting the SHP provider already does silent corrections on the fly in certain cases, like truncating the property names when found too long (both on reading and writing).
    5656
    5757== Test Plan ==
    5858
    59     * Enhance the unit test and add roundtripping fidelity tests for FdoInt32 properties.
     59    * Enhance the unit test and add roundtripping fidelity tests for !FdoInt32 properties.
    6060 
    6161== Funding/Resources ==