[SERVER-66969] The $add aggregation expression is not always commutative Created: 02/Jun/22 Updated: 06/Dec/22 Resolved: 09/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.0-rc8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | Backlog - Query Optimization |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | db.test.drop(); db.test.insert({_id: 1, x: new Date()}); // Returns a result. // Fails with error code 16612, "only one date allowed in an $add expression". |
||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 53 | ||||||||||||
| Description |
|
The $add expression is defined as being commutative, which is not true when a null value exists in the list being summed. |
| Comments |
| Comment by Davis Haupt (Inactive) [ 09/Jun/22 ] |
|
This can probably be closed as a duplicate of |