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

Initial implementation of $lookup

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.1.0-rc0
    • None
    • None
    • Fully Compatible

    Description

      1. Support optimization for BInaryJoin.
      2. Translate $lookup into a combination of BinaryJoin, Group, and Unwind.

      This is an *experimental* implementation of $lookup. To achieve fully compatible implementation we need the following:
      1. Add support for unwind to emit not just the array elements, but in addition the array itself. Such unwinding needs to occur on the inner side in order to match the left side both against the elements and the array itself. The inner side would perform a regular unwind.
      2. Add support for left outer join. Currently we only results when there is a match.
      3. Add ability to generate unique values (sequential or otherwise) in order to eliminate reliance of _id. This can be achieved for example via a stateful function. Currently, after joining the unwound elements, we perform a de-duplication based on _id to determine which corresponding documents match.

       

      Attachments

        Activity

          People

            svilen.mihaylov@mongodb.com Svilen Mihaylov
            svilen.mihaylov@mongodb.com Svilen Mihaylov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: