diff options
author | William Schultz <william.schultz@mongodb.com> | 2020-02-07 09:34:54 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-07 14:47:44 +0000 |
commit | b52d0d06a080ac7b2879ebb7da4a551f5aa36610 (patch) | |
tree | 1364d788dc2eb6a21d009847dafa0708d955b832 /src/mongo/db/pipeline/document_source_union_with.h | |
parent | 592bb96b9cd7c00b8741afaec23152ec7adc4909 (diff) | |
download | mongo-b52d0d06a080ac7b2879ebb7da4a551f5aa36610.tar.gz |
Revert "SERVER-45530 Implement $match and $project duplication and pushdown across $unionWith"
This reverts commit 942ec3300e82672536f34d8273314c5504ae91fb.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_union_with.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_union_with.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/mongo/db/pipeline/document_source_union_with.h b/src/mongo/db/pipeline/document_source_union_with.h index beb69c7e9e5..ba0327a4be2 100644 --- a/src/mongo/db/pipeline/document_source_union_with.h +++ b/src/mongo/db/pipeline/document_source_union_with.h @@ -80,15 +80,10 @@ public: std::vector<Value>& array, boost::optional<ExplainOptions::Verbosity> explain = boost::none) const final; - GetModPathsReturn getModifiedPaths() const final { - // Since we might have a document arrive from the foreign pipeline with the same path as a - // document in the main pipeline. Without introspecting the sub-pipeline, we must report - // that all paths have been modified. - return {GetModPathsReturn::Type::kAllPaths, {}, {}}; - } + GetModPathsReturn getModifiedPaths() const final; StageConstraints constraints(Pipeline::SplitState) const final { - auto constraints = StageConstraints( + return StageConstraints( StreamType::kStreaming, PositionRequirement::kNone, HostTypeRequirement::kAnyShard, @@ -99,13 +94,6 @@ public: // outside of the constraints as long as the involved namespaces are reported correctly. LookupRequirement::kAllowed, UnionRequirement::kAllowed); - - // DocumentSourceUnionWith cannot directly swap with match but it contains custom logic in - // the doOptimizeAt() member function to allow itself to duplicate any match ahead in the - // current pipeline and place one copy inside its sub-pipeline and one copy behind in the - // current pipeline. - constraints.canSwapWithMatch = false; - return constraints; } DepsTracker::State getDependencies(DepsTracker* deps) const final; @@ -123,15 +111,6 @@ public: protected: GetNextResult doGetNext() final; - - Pipeline::SourceContainer::iterator doOptimizeAt(Pipeline::SourceContainer::iterator itr, - Pipeline::SourceContainer* container) final; - - boost::intrusive_ptr<DocumentSource> optimize() final { - _pipeline->optimizePipeline(); - return this; - } - void doDispose() final; private: |