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

Implement path handling of localField when lowering $lookup to SBE

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-04-04, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21

      Both, the localField and foreignField, can be paths and we need to generate correct traversal sub-trees for them.

      Notes:
      1. paths with numbers, such as "a.0.b" aren't lowered for find queries so we should not lower $lookup stages that use them either
      2. the path traversal logic in the classic engine can be found here: https://github.com/10gen/mongo/blob/3a0132fcb97a7559b9bfdb0021b25e30f873acb1/src/mongo/db/pipeline/document_source_lookup.cpp#L832-L837. We should strive to replicate it unless we explicitly decide not to (which should be then documented by separate tickets)

            Assignee:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: