diff options
author | David Storch <david.storch@10gen.com> | 2017-04-12 14:53:25 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2017-04-18 18:11:15 -0400 |
commit | b9f9195390142f4e1363dc83b986ead5dc8993b8 (patch) | |
tree | d57f4c4643a64d3e64720a90560cc511dd8b5467 /src/mongo/db/pipeline/document_source_replace_root.cpp | |
parent | 071d0398b7e527fc5b8c1ffdd3474c91f34616f0 (diff) | |
download | mongo-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_replace_root.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_replace_root.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_replace_root.cpp b/src/mongo/db/pipeline/document_source_replace_root.cpp index 521cf748784..8f6782dc47e 100644 --- a/src/mongo/db/pipeline/document_source_replace_root.cpp +++ b/src/mongo/db/pipeline/document_source_replace_root.cpp @@ -89,7 +89,7 @@ public: DocumentSource::GetModPathsReturn getModifiedPaths() const final { // Replaces the entire root, so all paths are modified. - return {DocumentSource::GetModPathsReturn::Type::kAllPaths, std::set<std::string>{}}; + return {DocumentSource::GetModPathsReturn::Type::kAllPaths, std::set<std::string>{}, {}}; } // Create the replaceRoot transformer. Uasserts on invalid input. |