Join optimization: Location8146616: Could not find ... in the slot map, expected slot to exist

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-02-16
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      if the localfield of the $lookup is a dotted path, the query fails as follows:

       

      MongoServerError[Location8146616]: Could not find 3:'xxx.i_idx' in the slot map, expected slot to exist
       

      To reproduce:

      db.foo.drop();
      db.bar.drop();
      db.foo.insert({i_idx:1 });
      db.foo.createIndex({i_idx: 1});
      db.bar.insert({i_idx:1});
      
      db.foo.aggregate([{"$lookup":{"from":"bar","localField":"xxx.i_idx","foreignField":"i_idx","as":"baz"}},{"$unwind":"$baz"}, {$match: {i_idx: {$gte: 0}}}]);
      
       

            Assignee:
            Alberto Massari
            Reporter:
            Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: