[SERVER-23833] DocumentSourceLookup::getOutputSorts() does not correctly compute sort. Created: 20/Apr/16 Updated: 06/Jun/16 Resolved: 18/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benjamin Murphy | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Query 15 (06/03/16) |
| Participants: |
| Description |
|
In DocumentSourceLookup::getOutputSorts(), we truncate an input sort if a sort key matches our 'as' field exactly, as seen here. However, this is not correct – we should truncate each sort at either the 'as' key, or at any path prefix of the 'as' key. expression::isPathPrefixOf can be used to determine whether this is true. In addition, document_source_test.cpp should be updated to include tests for this behavior. As part of this work, the two namespaces for DocumentSourceLookup in document_source_test.cpp should be combined into one. |
| Comments |
| Comment by Githook User [ 18/May/16 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: This commit is identical to 44abb8db32a6fad705854793e397961dfc72d09e. |
| Comment by David Storch [ 18/May/16 ] |
|
These failures are due to https://github.com/mongodb/mongo/commit/51ee6f1952addc650b1c719cce51fcf460e6e9e8 (thanks to max.hirschhorn and waley.chen for verifying). I am going to re-commit Ben's original pull request. |
| Comment by Dianna Hohensee (Inactive) [ 18/May/16 ] |
|
Failing unittests on Enterprise Windows |
| Comment by Githook User [ 18/May/16 ] |
|
Author: {u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}Message: Revert " This reverts commit 44abb8db32a6fad705854793e397961dfc72d09e. Unit tests QueuedDataStageTest and SortStageTest are failing. |
| Comment by Githook User [ 17/May/16 ] |
|
Author: {u'username': u'benjaminmurphy', u'name': u'Benjamin Murphy', u'email': u'benjamin_murphy@me.com'}Message: Closes #1080 Signed-off-by: David Storch <david.storch@10gen.com> |
| Comment by Benjamin Murphy [ 12/May/16 ] |
|
Pull request here: https://github.com/mongodb/mongo/pull/1080 |
| Comment by Benjamin Murphy [ 29/Apr/16 ] |
|
DocumentSource::truncateSortSet() should be used when DocumentSourceLookup::getOutputSorts() is updated. |