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/parsed_exclusion_projection.h | |
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/parsed_exclusion_projection.h')
-rw-r--r-- | src/mongo/db/pipeline/parsed_exclusion_projection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/parsed_exclusion_projection.h b/src/mongo/db/pipeline/parsed_exclusion_projection.h index 74314d97439..8f64ac5258e 100644 --- a/src/mongo/db/pipeline/parsed_exclusion_projection.h +++ b/src/mongo/db/pipeline/parsed_exclusion_projection.h @@ -124,7 +124,7 @@ public: DocumentSource::GetModPathsReturn getModifiedPaths() const final { std::set<std::string> modifiedPaths; _root->addModifiedPaths(&modifiedPaths); - return {DocumentSource::GetModPathsReturn::Type::kFiniteSet, std::move(modifiedPaths)}; + return {DocumentSource::GetModPathsReturn::Type::kFiniteSet, std::move(modifiedPaths), {}}; } private: |