summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator_add_to_set.cpp
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2020-01-17 16:20:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-27 20:44:41 +0000
commit606fbf8eac896b0b4ed26e921b7f6bf1f73f5511 (patch)
tree4855ab6890e429ff79ffdf867d2b973361b62b00 /src/mongo/db/pipeline/accumulator_add_to_set.cpp
parent5e57c0b0f7505035c37179d100fdd43ef2b6cc36 (diff)
downloadmongo-606fbf8eac896b0b4ed26e921b7f6bf1f73f5511.tar.gz
SERVER-45447 Add $accumulator for user-defined Javascript accumulators
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_add_to_set.cpp')
-rw-r--r--src/mongo/db/pipeline/accumulator_add_to_set.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/accumulator_add_to_set.cpp b/src/mongo/db/pipeline/accumulator_add_to_set.cpp
index 3a6a7b22944..7af05eda870 100644
--- a/src/mongo/db/pipeline/accumulator_add_to_set.cpp
+++ b/src/mongo/db/pipeline/accumulator_add_to_set.cpp
@@ -81,7 +81,7 @@ Value AccumulatorAddToSet::getValue(bool toBeMerged) {
AccumulatorAddToSet::AccumulatorAddToSet(const boost::intrusive_ptr<ExpressionContext>& expCtx,
boost::optional<int> maxMemoryUsageBytes)
- : Accumulator(expCtx),
+ : AccumulatorState(expCtx),
_set(expCtx->getValueComparator().makeUnorderedValueSet()),
_maxMemUsageBytes(maxMemoryUsageBytes.value_or(internalQueryMaxAddToSetBytes.load())) {
_memUsageBytes = sizeof(*this);
@@ -92,7 +92,7 @@ void AccumulatorAddToSet::reset() {
_memUsageBytes = sizeof(*this);
}
-intrusive_ptr<Accumulator> AccumulatorAddToSet::create(
+intrusive_ptr<AccumulatorState> AccumulatorAddToSet::create(
const boost::intrusive_ptr<ExpressionContext>& expCtx) {
return new AccumulatorAddToSet(expCtx, boost::none);
}