-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- causes
-
SERVER-68396 Regression of $add aggregation expression behavior with Date type
- Closed
- is depended on by
-
SERVER-63099 Constant folding should not assume arithmetic is associative or commutative in the general case
- Closed
-
TOOLS-3145 Investigate changes in SERVER-65735: $add operator should not use DoubleDoubleSummation in the classic engine
- Closed
- is related to
-
SERVER-67282 $add expression should not use DoubleDoubleSummation in SBE
- Closed
- related to
-
SERVER-63018 Have ExpressionAdd::evaluate() return intermediate result for pipeline optimization constant folding
- Closed
-
SERVER-63099 Constant folding should not assume arithmetic is associative or commutative in the general case
- Closed
- links to