-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: Builder
-
None
When used in other supported stages, $sum has one of two syntaxes:
- $sum has one specified expression as its operand:
{ $sum: <expression> }
- $sum has a list of specified expressions as its operand:
{ $sum: [ <expression1>, <expression2> ... ] }
Only the 2nd syntax is implemented, because we thought it functionally covered the first with a single expression array.
But in the 1st syntax, the expression can resolve to an array.