trySbeRestricted results do not match classic internalQueryLegacyDottedPathNullSemantics

XMLWordPrintableJSON

    • Query Execution
    • Minor Change
    • ALL
    • v9.0
    • QE 2026-08-17
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Results don't match in the default knob configuration

      legacyNull=false forceClassicEngine => count: 2
      legacyNull=false trySbeRestricted => count: 3
      legacyNull=true forceClassicEngine => count: 2
      legacyNull=true trySbeRestricted => count: 2
      const docs = [{}, {b: [[], {a: 0}]}, {}];
      const pipeline = [{$match: {"b.a": {$gte: null}}}, {$group: {_id: null, n: {$sum: 1}}}];
      function count(coll) {
          const res = coll.aggregate(pipeline).toArray();
          return res.length ? res[0].n : 0;
      }
      for (const knob of [false, true]) {
          db.adminCommand({setParameter: 1, internalQueryLegacyDottedPathNullSemantics: knob});
          for (const eng of ["forceClassicEngine", "trySbeRestricted"]) {
              db.adminCommand({setParameter: 1, internalQueryFrameworkControl: eng});
              db.c.drop();
              docs.forEach((d) => db.c.insertOne(d));
              print("legacyNull=" + knob, eng, "=> count:", count(db.c));
          }
      } 

      I assume we want results to match here, but I don't have a ton of context.

            Assignee:
            Logan Karbiner
            Reporter:
            Evan Bergeron
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: