summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_coll_stats.cpp
diff options
context:
space:
mode:
authorCharlie Swanson <cswanson310@gmail.com>2016-08-29 10:06:41 -0400
committerCharlie Swanson <cswanson310@gmail.com>2016-09-01 14:08:25 -0400
commitb1014fe1b40a69cd90b27cb336a170317eecc6b7 (patch)
treec189d2d931cdfbdec83359f08cbb1639c1d5e254 /src/mongo/db/pipeline/document_source_coll_stats.cpp
parentd289e240b653e70a7d90be885a3ad6de21b7c6cb (diff)
downloadmongo-b1014fe1b40a69cd90b27cb336a170317eecc6b7.tar.gz
SERVER-24153 Allow pipelines within $facet stage to process in batches.
This approach removes the need to buffer all documents in memory, thus removing concerns about spilling intermediate results to disk.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_coll_stats.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_coll_stats.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_coll_stats.cpp b/src/mongo/db/pipeline/document_source_coll_stats.cpp
index d8c204e0b3c..7ae2e1d0e7b 100644
--- a/src/mongo/db/pipeline/document_source_coll_stats.cpp
+++ b/src/mongo/db/pipeline/document_source_coll_stats.cpp
@@ -83,9 +83,9 @@ intrusive_ptr<DocumentSource> DocumentSourceCollStats::createFromBson(
return collStats;
}
-boost::optional<Document> DocumentSourceCollStats::getNext() {
+DocumentSource::GetNextResult DocumentSourceCollStats::getNext() {
if (_finished) {
- return boost::none;
+ return GetNextResult::makeEOF();
}
_finished = true;
@@ -116,7 +116,7 @@ boost::optional<Document> DocumentSourceCollStats::getNext() {
}
}
- return Document(builder.obj());
+ return {Document(builder.obj())};
}
bool DocumentSourceCollStats::isValidInitialSource() const {