-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
ALL
-
-
Query 2019-08-26
When $multiply is evaluated, if an expression that evaluates to NaN is encountered first then the pipeline errors with the following message:
Error: command failed: { "ok" : 0, "errmsg" : "Failed to optimize pipeline :: caused by :: Can't coerce out of range value nan to long", "code" : 31109, "codeName" : "Location31109" } : aggregate failed
However if NaN is evaluated second, the command runs and returns results. This means that changing the order of the operands changes whether the command runs or errors, invalidating commutativity.
- duplicates
-
SERVER-42756 $multiply operator may return with or w/o an error depending on whether pipeline optimisation is enabled
- Closed