summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_match.cpp
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@10gen.com>2020-10-09 22:56:39 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-10 04:47:55 +0000
commit1ec7eeba23b21952b01050770c6ceb46ac1789f6 (patch)
tree1110bcf51818186f14561cd5dea50bfbe2ae2084 /src/mongo/db/pipeline/document_source_match.cpp
parenta36a312b744a419a3e065df99abb8c232bc93267 (diff)
downloadmongo-1ec7eeba23b21952b01050770c6ceb46ac1789f6.tar.gz
SERVER-51303 Fix lookup match absorbtion optimization for $type
Diffstat (limited to 'src/mongo/db/pipeline/document_source_match.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_match.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_match.cpp b/src/mongo/db/pipeline/document_source_match.cpp
index cf45cd689f0..ac1ca6b16c8 100644
--- a/src/mongo/db/pipeline/document_source_match.cpp
+++ b/src/mongo/db/pipeline/document_source_match.cpp
@@ -442,8 +442,7 @@ boost::intrusive_ptr<DocumentSourceMatch> DocumentSourceMatch::descendMatchOnPat
invariant(expression::isPathPrefixOf(descendOn, leafPath));
auto newPath = leafPath.substr(descendOn.size() + 1);
- if (node->getCategory() == MatchExpression::MatchCategory::kLeaf &&
- node->matchType() != MatchExpression::TYPE_OPERATOR) {
+ if (node->getCategory() == MatchExpression::MatchCategory::kLeaf) {
auto leafNode = static_cast<LeafMatchExpression*>(node);
leafNode->setPath(newPath);
} else if (node->getCategory() == MatchExpression::MatchCategory::kArrayMatching) {