JOO: "The path can not be resolved because it conflicts with a previously specified document prefix"

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      /**
       * Reproduction of local field overriding issue.
       * @tags: [
       *   requires_fcv_83,
       * ]
       */const docs = [
          {a: 1, b: 1},
          {a: 1, b: 2},
      ];const config = {
          setParameter: {
              internalEnableJoinOptimization: true,
          },
      };const conn = MongoRunner.runMongod(config);const db = conn.getDB(jsTestName());db.coll.drop();
      db.A.drop();
      db.B.drop();
      assert.commandWorked(db.coll.insertMany(docs));
      assert.commandWorked(db.A.insertMany(docs));
      assert.commandWorked(db.B.insertMany(docs));const pipeline = [
          {$lookup: {from: "A", localField: "a", foreignField: "b", as: "a"}},
          {$unwind: "$a"},
          {$lookup: {from: "B", localField: "b", foreignField: "b", as: "b"}},
          {$unwind: "$b"},
      ];const result = db.coll.aggregate(pipeline).toArray();MongoRunner.stopMongod(conn); 

      While you are at it, please consider fixing the typo in the error message.

            Assignee:
            Alexander Ignatyev
            Reporter:
            Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: