[SERVER-27644] distinct on a view doesn't "flatten" array members Created: 11/Jan/17 Updated: 16/Mar/21 Resolved: 07/Feb/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.4.1, 3.5.1 |
| Fix Version/s: | 3.4.4, 3.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Kyle Suarez |
| Resolution: | Done | Votes: | 0 |
| Labels: | read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||
| Sprint: | Query 2017-02-13 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
If you create an identity view on a collection which has some field that contains an array, the result of db.collection.distinct("thatfield") and db.identityview.distinct("thatfield") will not be the same.
|
| Comments |
| Comment by Githook User [ 14/Apr/17 ] |
|
Author: {u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'kyle.suarez@mongodb.com'}Message: (cherry picked from commit 3ed956d8813b7b56c2319456c28838dfa6c5c20b) Conflicts: |
| Comment by Githook User [ 07/Feb/17 ] |
|
Author: {u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'kyle.suarez@mongodb.com'}Message: |
| Comment by Kyle Suarez [ 11/Jan/17 ] |
|
A fix for this also needs to update jstests/core/views/views_distinct.js to run tests on documents with more complicated schemas (arrays definitely, and maybe nested objects and nullish values). |