Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Proposed]

      Description

      The definition of the Scale facet as the maximum number of digits right of the decimal point implies that there may be less digits to the right and consequently more digits to the left of the decimal point (up to the value of the Precision facet), so the decimal point is allowed to float within the given Precision.

        Attachments

          Activity

          ralfhandl Ralf Handl created issue -
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Unfortunately, not all implementations of Decimal will be floating precision. The best we can do is to say that the data type MAY be floating precision, but that clients SHOULD NOT assume that to be the case. We can add an annotation for specifying whether or not a particular usage of decimal is fixed or floating precision.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Unfortunately, not all implementations of Decimal will be floating precision. The best we can do is to say that the data type MAY be floating precision, but that clients SHOULD NOT assume that to be the case. We can add an annotation for specifying whether or not a particular usage of decimal is fixed or floating precision.
          mikep Michael Pizzo (Inactive) made changes -
          Field Original Value New Value
          Proposal Make explicit. Make explicit; give direction (see comment)
          Hide
          ralfhandl Ralf Handl added a comment -

          Make sure that servers do not require clients to add "padding" zeros up to Scale

          Show
          ralfhandl Ralf Handl added a comment - Make sure that servers do not require clients to add "padding" zeros up to Scale
          ralfhandl Ralf Handl made changes -
          Assignee Michael Pizzo [ mikep ]
          Environment [Proposed]
          Status New [ 10000 ] Open [ 1 ]
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Ralf and Mike will work offline and bring back with specific proposed wording.

          Show
          mikep Michael Pizzo (Inactive) added a comment - Ralf and Mike will work offline and bring back with specific proposed wording.
          mikep Michael Pizzo (Inactive) made changes -
          Proposal Make explicit; give direction (see comment)
          mikep Michael Pizzo (Inactive) made changes -
          Proposal Add a new (optional) Boolean attribute to decimal, "VariableScale", with a default of false. If false or missing, the client MUST assume that the property can only support fixed precision.
          Environment [Proposed]
          Hide
          mikep Michael Pizzo (Inactive) added a comment -

          Note in ODATA-256, Evan cautions against supporting floating point in a decimal type:
          "I recommend caution with any proposal to introduce quad precision binary floating point, or even decimal floating point for that matter. I do not believe that the support is there for such types across a sufficient number of the client types that may need to interoperate with OData services."

          Show
          mikep Michael Pizzo (Inactive) added a comment - Note in ODATA-256 , Evan cautions against supporting floating point in a decimal type: "I recommend caution with any proposal to introduce quad precision binary floating point, or even decimal floating point for that matter. I do not believe that the support is there for such types across a sufficient number of the client types that may need to interoperate with OData services."
          Hide
          ralfhandl Ralf Handl added a comment -

          I understood Evan's comment cautioning against introducing a DECFLOAT equivalent, which is not widely used.

          OData's Edm.Decimal can be represented as BigDecimal in Java, NSDecimalNumber in Objective-C, and decimal in C#.

          All of these are variable-scale, so introducing the VariableScale facet is no burden for these platforms.

          And all monetary amounts in SAP Business Suite are fixed-precision and variable-scale, so if we limit Edm.Decimal to fixed-scale, we'd have to use Edm.Decimal with artificially large Precision and Scale values and tell clients via an annotation that "by the way, only half of the digits are actually used".

          Show
          ralfhandl Ralf Handl added a comment - I understood Evan's comment cautioning against introducing a DECFLOAT equivalent, which is not widely used. OData's Edm.Decimal can be represented as BigDecimal in Java, NSDecimalNumber in Objective-C, and decimal in C#. All of these are variable-scale, so introducing the VariableScale facet is no burden for these platforms. And all monetary amounts in SAP Business Suite are fixed-precision and variable-scale, so if we limit Edm.Decimal to fixed-scale, we'd have to use Edm.Decimal with artificially large Precision and Scale values and tell clients via an annotation that "by the way, only half of the digits are actually used".
          ralfhandl Ralf Handl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          ralfhandl Ralf Handl made changes -
          Proposal Add a new (optional) Boolean attribute to decimal, "VariableScale", with a default of false. If false or missing, the client MUST assume that the property can only support fixed precision. Add a new (optional) Boolean attribute to decimal, "VariableScale", with a default of false. If false or missing, the client MUST assume that the property can only support fixed precision.

          Accepted: https://www.oasis-open.org/committees/download.php/48346/odata-meeting-26_on-20130221-minutes.html#odata-76
          ralfhandl Ralf Handl made changes -
          Assignee Michael Pizzo [ mikep ] Ralf Handl [ ralfhandl ]
          handl Ralf Handl made changes -
          Reporter Ralf Handl [ ralfhandl ] Ralf Handl [ handl ]
          handl Ralf Handl made changes -
          Assignee Ralf Handl [ ralfhandl ] Ralf Handl [ handl ]

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: