summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_replace_root.cpp
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2017-05-04 16:42:53 -0400
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2017-05-23 18:39:40 -0400
commit824f61af05cee3ec76986b28867b02659c0045b4 (patch)
tree89610bd3cbee6f6ecf2484473e3bb44029656231 /src/mongo/db/pipeline/document_source_replace_root.cpp
parenta4a7575ab62fc686d82e6e5706467d55cdfd6b08 (diff)
downloadmongo-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.cpp4
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);