Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23833

DocumentSourceLookup::getOutputSorts() does not correctly compute sort.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.8
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Query 15 (06/03/16)

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              david.storch David Storch
              Reporter:
              benjamin.murphy Benjamin Murphy
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: