Explain for distinct using collection scan reports incorrect values

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Execution
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      (function() {
          db.c.insert({a:1});
          db.c.insert({a:1});
          printjson(db.c.explain("allPlansExecution").distinct("a"));
      })();
      
      $ resmoke.py --suites=core repro-file.js
      

      Currently nReturned will be 2 (rather than 1). If an index

      {a: 1}

      is created, then nReturned will be the correct value of 1.

      Once this is fixed, there may be special work we have to do to get this to work correctly under sharded clusters.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: