[SERVER-9023] $add returns null if any of the operands are null Created: 19/Mar/13 Updated: 10/Dec/14 Resolved: 21/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Travis Dahlke | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoDB 2.4.0, Mac OS X 10.8.2 |
||
| Operating System: | ALL | |||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||
| Participants: |
| Description |
|
In version 2.2, the aggregation framework $add operator correctly added all non-null operands. In version 2.4, if any one of the operands is null, it returns null. |
| Comments |
| Comment by Ian Whalen (Inactive) [ 21/Mar/13 ] |
|
Hi Travis, this was an intentional design decision made for 2.4.0 that you can read about in |