tassert in plan enumerator when empty path and $elemMatch are used

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • Hide
      const coll = db.coll;
      assert(coll.drop());
      
      assert.commandWorked(coll.createIndex({"$**": 1}));
      assert.commandWorked(coll.insert({}));
      
      const matchPred = {
          t: 1,
          "": {
              $elemMatch: {
                  $or: [{a: 1}, {b: 1}],
              },
          },
      };
      
      coll.find(matchPred).toArray();
      // tassert 9074700
      
      Show
      const coll = db.coll; assert (coll.drop()); assert .commandWorked(coll.createIndex({ "$**" : 1})); assert .commandWorked(coll.insert({})); const matchPred = { t: 1, "": { $elemMatch: { $or: [{a: 1}, {b: 1}], }, }, }; coll.find(matchPred).toArray(); // tassert 9074700
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The repro script attached reaches a tassert in the plan enumerator, "9074700: RelevantTag is not assigned to the match expression node". From what I've tried, the empty path + elemMatch seem to be required to reach this issue

            Assignee:
            Kartal Kaan Bozdogan
            Reporter:
            Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: