[SERVER-41992] $setIntersection with null and empty intersections violates commutativity Created: 27/Jun/19 Updated: 29/Oct/23 Resolved: 23/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Claire Childs (Inactive) | Assignee: | George Wangensteen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | afz, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||
| Backport Requested: |
v4.2
|
||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||
| Sprint: | Query 2019-07-15, Query 2019-07-29 | ||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||
| Description |
|
When $setIntersection is evaluated, if a nullish expression is encountered first then null is returned. If instead the intersection becomes empty, then an empty array is returned. This means that changing the order of the operands changes the result, invalidating commutativity.
|
| Comments |
| Comment by Githook User [ 23/Jul/19 ] |
|
Author: {'name': 'George Wangensteen', 'email': 'george.wangensteen@10gen.com'}Message: |
| Comment by David Storch [ 27/Jun/19 ] |
|
Great find claire.childs! |