summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_graph_lookup.h
diff options
context:
space:
mode:
authorMartin Neupauer <martin.neupauer@mongodb.com>2019-01-24 17:58:51 -0500
committerMartin Neupauer <martin.neupauer@mongodb.com>2019-01-29 11:20:19 -0500
commitb8231a4b5a25a957219c9c2e6b51f93c674e0b37 (patch)
tree89fc37a242b1a17a03e639b472aeaf1345ef154b /src/mongo/db/pipeline/document_source_graph_lookup.h
parentdeb8b507f40949c75ff7ce65387b3d664d1db699 (diff)
downloadmongo-b8231a4b5a25a957219c9c2e6b51f93c674e0b37.tar.gz
SERVER-39166 $graphLookup should force a pipeline to split in sharded cluster
Diffstat (limited to 'src/mongo/db/pipeline/document_source_graph_lookup.h')
-rw-r--r--src/mongo/db/pipeline/document_source_graph_lookup.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.h b/src/mongo/db/pipeline/document_source_graph_lookup.h
index cc186225ce8..5f1af60d2ce 100644
--- a/src/mongo/db/pipeline/document_source_graph_lookup.h
+++ b/src/mongo/db/pipeline/document_source_graph_lookup.h
@@ -38,7 +38,7 @@
namespace mongo {
-class DocumentSourceGraphLookUp final : public DocumentSource {
+class DocumentSourceGraphLookUp final : public DocumentSource, public NeedsMergerDocumentSource {
public:
static std::unique_ptr<LiteParsedDocumentSourceForeignCollections> liteParse(
const AggregationRequest& request, const BSONElement& spec);
@@ -72,6 +72,14 @@ public:
return DepsTracker::State::SEE_NEXT;
};
+ boost::intrusive_ptr<DocumentSource> getShardSource() final {
+ return nullptr;
+ }
+
+ MergingLogic mergingLogic() final {
+ return {this};
+ }
+
void addInvolvedCollections(std::vector<NamespaceString>* collections) const final {
collections->push_back(_from);
}