Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81885

Remove explain attribute from aggregate command idl

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      Currently there are two ways to issue explain from aggregate command:

       

      db.runCommand({ explain: aggCmd });
      db.runCommand({ …aggCmd, explain: true });

      The first way is the preferred way, while the second one pre-dates the existence of the explain command.

      The first way is also an alias over the second way under the hood (as explain command calls parseForExplain() which in itself attaches the verbosity from the explain to the aggregation object)

       

      Explain attribute is not part of the stable API (code, documentation) and can be removed.

       

      PS: Noticed that aggregate::explain type is not boolean (based on idl definition), but rather explain verbosity and this verbosity is used later for explain

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: