-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Fully Compatible
-
ALL
-
Query 15 (06/03/16)
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.
- links to