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

Initial implementation of $lookup

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      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.

       

            Assignee:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Reporter:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: