summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/planner_analysis.cpp
diff options
context:
space:
mode:
authorBilly Donahue <BillyDonahue@users.noreply.github.com>2022-07-27 18:17:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-27 19:38:08 +0000
commit958ad9abfc80861d3f43f44da694e83464b01e1d (patch)
treeca14e7097c1cb8ab20dfad7fa6888511f0226650 /src/mongo/db/query/planner_analysis.cpp
parentf8a1ac19be6279e7ace012dafa8cfcaa028d49e1 (diff)
downloadmongo-958ad9abfc80861d3f43f44da694e83464b01e1d.tar.gz
SERVER-68246 rewrite calls to boost::optional get and is_initialized
Diffstat (limited to 'src/mongo/db/query/planner_analysis.cpp')
-rw-r--r--src/mongo/db/query/planner_analysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/query/planner_analysis.cpp b/src/mongo/db/query/planner_analysis.cpp
index d05078423b7..a4ef137a7e5 100644
--- a/src/mongo/db/query/planner_analysis.cpp
+++ b/src/mongo/db/query/planner_analysis.cpp
@@ -630,9 +630,9 @@ void removeInclusionProjectionBelowGroupRecursive(QuerySolutionNode* solnRoot) {
// Multiple $group stages may be pushed down. So, if the child is a GROUP, then recurse.
return removeInclusionProjectionBelowGroupRecursive(projectNodeCandidate);
} else if (auto projection = attemptToGetProjectionFromQuerySolution(*projectNodeCandidate);
- projection && projection.get()->isInclusionOnly()) {
+ projection && projection.value()->isInclusionOnly()) {
// Check to see if the projectNode's field set is a super set of the groupNodes.
- if (!isSubset(groupNode->requiredFields, projection.get()->getRequiredFields())) {
+ if (!isSubset(groupNode->requiredFields, projection.value()->getRequiredFields())) {
// The dependency set of the GROUP stage is wider than the projectNode field set.
return;
}
@@ -988,7 +988,7 @@ std::unique_ptr<QuerySolutionNode> QueryPlannerAnalysis::analyzeSort(
solnSortPattern = providedSorts.getBaseSortPattern();
}
- if (sortMatchesTraversalPreference(params.traversalPreference.get(), solnSortPattern) &&
+ if (sortMatchesTraversalPreference(params.traversalPreference.value(), solnSortPattern) &&
QueryPlannerCommon::scanDirectionsEqual(solnRoot.get(),
-params.traversalPreference->direction)) {
QueryPlannerCommon::reverseScans(solnRoot.get(), true);