Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65735

$add operator should not use DoubleDoubleSummation in the classic engine

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change
    • ALL
    • v6.0, v5.3, v5.0, v4.4, v4.2
    • QO 2022-05-02, QO 2022-05-16, QO 2022-05-30, QO 2022-06-13, QO 2022-06-27
    • 12

      Discussed with geert.bosch@mongodb.com who implemented DoubleDoubleSummation in SERVER-19735 and we determined that DoubleDoubleSummation was implemented for use in $group aggregation operators like $sum where the user does not have control over the ordering of input arguments and there are consistently a very large number of values that need to be summed.

      For the $add expression, where arguments are passed in explicitly by the end user, we should be prioritizing the behavior which is most clear and obvious and add doubles together normally. 

      This ticket fell out of SERVER-63099, which is attempting to make $add behave the same with and without the constant folding optimization.

      More background around this decision can be found in this writeup.

            Assignee:
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Reporter:
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: