summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator_multi.h
diff options
context:
space:
mode:
authorMihai Andrei <mihai.andrei@10gen.com>2021-08-23 19:40:31 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-23 20:17:21 +0000
commitddbc84d44d03216cc3268f4354acda389a2c8c32 (patch)
treef1181d0ff079c04d6148d85912dc21cdf561e08d /src/mongo/db/pipeline/accumulator_multi.h
parent0f3cd5391f1b67f0f2ed23c77a8bd217b407d8a2 (diff)
downloadmongo-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.h9
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;
/**