diff options
author | David Percy <david.percy@mongodb.com> | 2020-01-17 16:20:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-27 20:44:41 +0000 |
commit | 606fbf8eac896b0b4ed26e921b7f6bf1f73f5511 (patch) | |
tree | 4855ab6890e429ff79ffdf867d2b973361b62b00 /src/mongo/db/pipeline/accumulator_add_to_set.cpp | |
parent | 5e57c0b0f7505035c37179d100fdd43ef2b6cc36 (diff) | |
download | mongo-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.cpp | 4 |
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); } |