summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_sample_from_random_cursor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_sample_from_random_cursor.h')
-rw-r--r--src/mongo/db/pipeline/document_source_sample_from_random_cursor.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_sample_from_random_cursor.h b/src/mongo/db/pipeline/document_source_sample_from_random_cursor.h
index 6e8a2ae1d39..0d0ac39ca49 100644
--- a/src/mongo/db/pipeline/document_source_sample_from_random_cursor.h
+++ b/src/mongo/db/pipeline/document_source_sample_from_random_cursor.h
@@ -44,8 +44,6 @@ public:
Value serialize(bool explain = false) const final;
GetDepsReturn getDependencies(DepsTracker* deps) const final;
- void doInjectExpressionContext() final;
-
static boost::intrusive_ptr<DocumentSourceSampleFromRandomCursor> create(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
long long size,
@@ -71,9 +69,8 @@ private:
std::string _idField;
// Keeps track of the documents that have been returned, since a random cursor is allowed to
- // return duplicates. We use boost::optional to defer initialization until the ExpressionContext
- // containing the correct comparator is injected.
- boost::optional<ValueUnorderedSet> _seenDocs;
+ // return duplicates.
+ ValueUnorderedSet _seenDocs;
// The approximate number of documents in the collection (includes orphans).
const long long _nDocsInColl;