summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_graph_lookup.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2017-04-12 14:53:25 -0400
committerDavid Storch <david.storch@10gen.com>2017-04-18 18:11:15 -0400
commitb9f9195390142f4e1363dc83b986ead5dc8993b8 (patch)
treed57f4c4643a64d3e64720a90560cc511dd8b5467 /src/mongo/db/pipeline/document_source_graph_lookup.cpp
parent071d0398b7e527fc5b8c1ffdd3474c91f34616f0 (diff)
downloadmongo-b9f9195390142f4e1363dc83b986ead5dc8993b8.tar.gz
SERVER-27115 extend $match swapping optimization to handle renamed fields
If a field renamed by $project or $addFields is used in a subsequent $match, we can now swap the $match and update it to use the original (or, "renamed from") field name. This allows $match planning to result in better index usage in some cases.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_graph_lookup.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_graph_lookup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.cpp b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
index 717b82d59aa..7cc78ba8e95 100644
--- a/src/mongo/db/pipeline/document_source_graph_lookup.cpp
+++ b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
@@ -351,7 +351,7 @@ DocumentSource::GetModPathsReturn DocumentSourceGraphLookUp::getModifiedPaths()
modifiedPaths.insert(pathsModifiedByUnwind.paths.begin(),
pathsModifiedByUnwind.paths.end());
}
- return {GetModPathsReturn::Type::kFiniteSet, std::move(modifiedPaths)};
+ return {GetModPathsReturn::Type::kFiniteSet, std::move(modifiedPaths), {}};
}
Pipeline::SourceContainer::iterator DocumentSourceGraphLookUp::doOptimizeAt(