summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/mr_common.cpp
diff options
context:
space:
mode:
authorAndrii Dobroshynski <andrii.dobroshynski@mongodb.com>2021-06-25 03:58:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-30 14:52:00 +0000
commit1375ed058fd9737100fe00f845a54fe95cde79d2 (patch)
tree588c3c3ebbca7af645a0ff4abfc12b9512cddc09 /src/mongo/db/commands/mr_common.cpp
parent36341a87e2480634d4a84b58532d13b22e1e5dfb (diff)
downloadmongo-1375ed058fd9737100fe00f845a54fe95cde79d2.tar.gz
SERVER-57899 Expose accumulator name to make it more convenient to switch on type of AccumulatorStatement
Diffstat (limited to 'src/mongo/db/commands/mr_common.cpp')
-rw-r--r--src/mongo/db/commands/mr_common.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/mr_common.cpp b/src/mongo/db/commands/mr_common.cpp
index 46a0a0e6284..3bef28fae6b 100644
--- a/src/mongo/db/commands/mr_common.cpp
+++ b/src/mongo/db/commands/mr_common.cpp
@@ -130,7 +130,8 @@ auto translateReduce(boost::intrusive_ptr<ExpressionContext> expCtx, std::string
AccumulationStatement jsReduce("value",
AccumulationExpression(std::move(initializer),
std::move(argument),
- std::move(reduceFactory)));
+ std::move(reduceFactory),
+ AccumulatorInternalJsReduce::kName));
auto groupKeyExpression =
ExpressionFieldPath::parse(expCtx.get(), "$emits.k", expCtx->variablesParseState);
return DocumentSourceGroup::create(expCtx,