Support $lookup with external foreign side and sub-pipeline

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • QE 2022-08-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Here's repro script.

      var kUrl = "file://jstests/noPassthrough/coll.bson";
      var kMd = {url: kUrl};
      var pipeline = [
          {$unionWith: {external: {urls: [kMd], storageType: "local"}}},
          {$match: {a: {$lt: 10}}},
          {$lookup: {
              from: {urls: [kMd], storageType: "local"},
              localField: "a",
              foreignField: "a",
              pipeline: [{$match: {a: {$lt: 5}}}],
              as: "j"
          }},
          {$unwind: "$j"}
      ];
      
      db[1].aggregate(pipeline);
      

            Assignee:
            Yoon Soo Kim (Inactive)
            Reporter:
            Yoon Soo Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: