diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2017-05-04 16:42:53 -0400 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2017-05-23 18:39:40 -0400 |
commit | 824f61af05cee3ec76986b28867b02659c0045b4 (patch) | |
tree | 89610bd3cbee6f6ecf2484473e3bb44029656231 /src/mongo/db/pipeline/document_source_replace_root.cpp | |
parent | a4a7575ab62fc686d82e6e5706467d55cdfd6b08 (diff) | |
download | mongo-824f61af05cee3ec76986b28867b02659c0045b4.tar.gz |
SERVER-20092: Add ability for DocumentSourceCursor to coalesce with a stage if it is doing an equivalent projection
Diffstat (limited to 'src/mongo/db/pipeline/document_source_replace_root.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_replace_root.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_replace_root.cpp b/src/mongo/db/pipeline/document_source_replace_root.cpp index 7524ea84572..b5def20495e 100644 --- a/src/mongo/db/pipeline/document_source_replace_root.cpp +++ b/src/mongo/db/pipeline/document_source_replace_root.cpp @@ -52,6 +52,10 @@ public: ReplaceRootTransformation(const boost::intrusive_ptr<ExpressionContext>& expCtx) : _expCtx(expCtx) {} + TransformerType getType() const final { + return TransformerType::kReplaceRoot; + } + Document applyTransformation(const Document& input) final { // Extract subdocument in the form of a Value. Value newRoot = _newRoot->evaluate(input); |