diff options
author | Nicholas Zolnierz <nicholas.zolnierz@mongodb.com> | 2020-02-19 22:58:38 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-02-19 22:58:38 +0000 |
commit | b06b7d7dc5badc18c2977ee22ecb8ad339f5f27a (patch) | |
tree | 63fc225aee7ed58fd3bd59f310acb181a2d04b67 /src/mongo/db/pipeline/document_source_union_with.h | |
parent | c54a777a4a154984f5595b11993d7d009350a38c (diff) | |
download | mongo-b06b7d7dc5badc18c2977ee22ecb8ad339f5f27a.tar.gz |
SERVER-46015 Cleanup Pipeline parsing for aggregation stages with child pipelines
Diffstat (limited to 'src/mongo/db/pipeline/document_source_union_with.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_union_with.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/mongo/db/pipeline/document_source_union_with.h b/src/mongo/db/pipeline/document_source_union_with.h index 3225a1e6468..ade72532935 100644 --- a/src/mongo/db/pipeline/document_source_union_with.h +++ b/src/mongo/db/pipeline/document_source_union_with.h @@ -62,19 +62,7 @@ public: DocumentSourceUnionWith(const boost::intrusive_ptr<ExpressionContext>& expCtx, std::unique_ptr<Pipeline, PipelineDeleter> pipeline) - : DocumentSource(kStageName, expCtx), _pipeline(std::move(pipeline)) { - if (_pipeline) { - const auto& sources = _pipeline->getSources(); - auto it = std::find_if(sources.begin(), sources.end(), [](const auto& src) { - return !src->constraints().isAllowedInUnionPipeline(); - }); - - uassert(31441, - str::stream() << (*it)->getSourceName() - << " is not allowed within a $unionWith's sub-pipeline", - it == sources.end()); - } - } + : DocumentSource(kStageName, expCtx), _pipeline(std::move(pipeline)) {} const char* getSourceName() const final { return kStageName.rawData(); |