diff options
author | David Storch <david.storch@10gen.com> | 2017-02-10 11:52:18 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2017-03-13 09:46:14 -0400 |
commit | 82b16740f8a66093b453a73a04b3b9bd00e5d7a0 (patch) | |
tree | 62d156fc9676526ecbea19cd03ef7a293579c4df /src/mongo/db/pipeline/document_source_sort.h | |
parent | 73f9e8b8a8422becf8694fe3d82c0e647dc71189 (diff) | |
download | mongo-82b16740f8a66093b453a73a04b3b9bd00e5d7a0.tar.gz |
SERVER-19758 add support for "executionStats" and "allPlansExecution" to agg explain
Like other explainable commands, aggregate can now be
explained using the explain command, e.g.
db.runCommand({explain: {aggregate: ...}, verbosity:
"executionStats"}). The existing explain:true flag
corresponds to "queryPlanner" mode and is still supported.
However, explain:true cannot be specified when explaining
aggregate via the explain command.
Additional execution information is provided only in the
$cursor section of the aggregation explain output. Having
aggregation stages themselves track and report execution
info is further work.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_sort.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_sort.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_sort.h b/src/mongo/db/pipeline/document_source_sort.h index d9266011a55..52d2ff2b687 100644 --- a/src/mongo/db/pipeline/document_source_sort.h +++ b/src/mongo/db/pipeline/document_source_sort.h @@ -43,7 +43,9 @@ public: // virtuals from DocumentSource GetNextResult getNext() final; const char* getSourceName() const final; - void serializeToArray(std::vector<Value>& array, bool explain = false) const final; + void serializeToArray( + std::vector<Value>& array, + boost::optional<ExplainOptions::Verbosity> explain = boost::none) const final; GetModPathsReturn getModifiedPaths() const final { // A $sort does not modify any paths. @@ -123,7 +125,7 @@ public: private: explicit DocumentSourceSort(const boost::intrusive_ptr<ExpressionContext>& pExpCtx); - Value serialize(bool explain = false) const final { + Value serialize(boost::optional<ExplainOptions::Verbosity> explain = boost::none) const final { MONGO_UNREACHABLE; // Should call serializeToArray instead. } |