diff options
author | Mihai Andrei <mihai.andrei@10gen.com> | 2021-08-23 19:40:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-23 20:17:21 +0000 |
commit | ddbc84d44d03216cc3268f4354acda389a2c8c32 (patch) | |
tree | f1181d0ff079c04d6148d85912dc21cdf561e08d /src/mongo/db/pipeline/accumulator_multi.h | |
parent | 0f3cd5391f1b67f0f2ed23c77a8bd217b407d8a2 (diff) | |
download | mongo-ddbc84d44d03216cc3268f4354acda389a2c8c32.tar.gz |
SERVER-57885 Implement $minN and $maxN as window functions
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_multi.h')
-rw-r--r-- | src/mongo/db/pipeline/accumulator_multi.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/accumulator_multi.h b/src/mongo/db/pipeline/accumulator_multi.h index e14d3cabc60..f15063fdcb5 100644 --- a/src/mongo/db/pipeline/accumulator_multi.h +++ b/src/mongo/db/pipeline/accumulator_multi.h @@ -46,9 +46,16 @@ class AccumulatorN : public AccumulatorState { public: AccumulatorN(ExpressionContext* expCtx); + /** + * Verifies that 'input' is a positive integer. + */ + static long long validateN(const Value& input); + void processInternal(const Value& input, bool merging) final; - // Initialize 'n' with 'input'. In particular, verifies that 'input' is a positive integer. + /** + * Initialize 'n' with 'input'. + */ void startNewGroup(const Value& input) final; /** |