Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-643

The type of AVG should always be double (not the type of the field)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: JDO 2 maintenance release 2 (2.2)
    • Fix Version/s: JDO 3.1-rc1
    • Component/s: specification, tck
    • Labels:
      None

      Description

      Aggregate type specification at page 175 claims that avg(expression) return type is the same of the enclosed expression.
      This is wrong from a strictly mathematical point of view.
      In fact, if you select an avg on an int field member the result is truncated.
      The result type should always be double.

        Attachments

        1. JDO-643.patch
          1 kB
          Andy Jefferson

          Activity

            People

            • Assignee:
              mbo Michael Bouschen
              Reporter:
              ganzuoni Guido Anzuoni
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: