Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3145

Investigate changes in SERVER-65735: $add operator should not use DoubleDoubleSummation in the classic engine

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      Original Downstream Change Summary

      This is a small change in how floating-point $add expressions are evaluated. In operand lists with 10+ floating points, there may be a slightly different output depending on floating point errors.

      Description of Linked Ticket

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: