summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/subplan.cpp
diff options
context:
space:
mode:
authorJustin Seyster <justin.seyster@mongodb.com>2017-09-29 16:00:36 -0400
committerJustin Seyster <justin.seyster@mongodb.com>2017-09-29 16:00:36 -0400
commitb3bdd98e0d9cab6857590c174a81911a9a8205ac (patch)
treee158ad285dbffa4ca5ef9d551947f84a03433810 /src/mongo/db/exec/subplan.cpp
parent59ead734faa8aa51f0c53bf2bd39d0a0247ddf99 (diff)
downloadmongo-b3bdd98e0d9cab6857590c174a81911a9a8205ac.tar.gz
Reapply "SERVER-30991 Introduce MatchExpression::optimize()."
This patch undoes the revert in 3cf4e0593c394dd7eb45d8000d76b5dc73a3f425 and includes minor changes to fix the compiler problem that resulted in the previous revert.
Diffstat (limited to 'src/mongo/db/exec/subplan.cpp')
-rw-r--r--src/mongo/db/exec/subplan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/exec/subplan.cpp b/src/mongo/db/exec/subplan.cpp
index 021bf3efd5a..f8b30a6a7a3 100644
--- a/src/mongo/db/exec/subplan.cpp
+++ b/src/mongo/db/exec/subplan.cpp
@@ -161,7 +161,7 @@ std::unique_ptr<MatchExpression> SubplanStage::rewriteToRootedOr(
}
// Normalize and sort the resulting match expression.
- orChild = std::unique_ptr<MatchExpression>(CanonicalQuery::normalizeTree(orChild.release()));
+ orChild = MatchExpression::optimize(std::move(orChild));
CanonicalQuery::sortTree(orChild.get());
return orChild;