summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/document_value
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2021-02-09 19:11:10 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-16 17:31:47 +0000
commit9849b9f4a485c91b812ec1d068e610824cb1105e (patch)
treefb19723230ca6f7764028460fce7a3c266d04b1e /src/mongo/db/exec/document_value
parent2eb1fbcfc5a10cd777f7e6883b2aeb971f1333ac (diff)
downloadmongo-9849b9f4a485c91b812ec1d068e610824cb1105e.tar.gz
SERVER-53714 Add removable $min/$max window functions
Diffstat (limited to 'src/mongo/db/exec/document_value')
-rw-r--r--src/mongo/db/exec/document_value/value_comparator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/exec/document_value/value_comparator.h b/src/mongo/db/exec/document_value/value_comparator.h
index 0ab008df31d..85858802f16 100644
--- a/src/mongo/db/exec/document_value/value_comparator.h
+++ b/src/mongo/db/exec/document_value/value_comparator.h
@@ -158,6 +158,14 @@ public:
}
/**
+ * Construct an empty ordered multiset of Values whose ordering and equivalence classes are
+ * given by this comparator. This comparator must outlive the returned set.
+ */
+ std::multiset<Value, LessThan> makeOrderedValueMultiset() const {
+ return std::multiset<Value, LessThan>(LessThan(this));
+ }
+
+ /**
* Construct an empty unordered set of Values whose equivalence classes are given by this
* comparator. This comparator must outlive the returned set.
*/
@@ -192,6 +200,7 @@ private:
//
using ValueSet = std::set<Value, ValueComparator::LessThan>;
+using ValueMultiset = std::multiset<Value, ValueComparator::LessThan>;
using ValueUnorderedSet =
stdx::unordered_set<Value, ValueComparator::Hasher, ValueComparator::EqualTo>;