summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline.cpp
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2018-02-14 15:48:53 -0500
committerCharlie Swanson <charlie.swanson@mongodb.com>2018-03-06 12:18:27 -0500
commita7106b407cecdcfa8ba6c8765c9874bce65a6d5a (patch)
treeae17d3d93617f04af362627bd656ecd82e67840a /src/mongo/db/pipeline/pipeline.cpp
parent29be917dd176b883880198347d872fa10d1ad701 (diff)
downloadmongo-a7106b407cecdcfa8ba6c8765c9874bce65a6d5a.tar.gz
SERVER-24978 Use AsyncResultsMerger in $mergeCursors
Diffstat (limited to 'src/mongo/db/pipeline/pipeline.cpp')
-rw-r--r--src/mongo/db/pipeline/pipeline.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/pipeline.cpp b/src/mongo/db/pipeline/pipeline.cpp
index 499d8c3d6e5..0eb286bca28 100644
--- a/src/mongo/db/pipeline/pipeline.cpp
+++ b/src/mongo/db/pipeline/pipeline.cpp
@@ -142,7 +142,7 @@ void Pipeline::validatePipeline() const {
uasserted(ErrorCodes::InvalidNamespace,
"{aggregate: 1} is not valid for an empty pipeline.");
}
- } else if (!dynamic_cast<DocumentSourceMergeCursors*>(_sources.front().get())) {
+ } else if ("$mergeCursors"_sd != _sources.front()->getSourceName()) {
// The $mergeCursors stage can take {aggregate: 1} or a normal namespace. Aside from this,
// {aggregate: 1} is only valid for collectionless sources, and vice-versa.
const auto firstStageConstraints = _sources.front()->constraints(_splitState);