From 958ad9abfc80861d3f43f44da694e83464b01e1d Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Wed, 27 Jul 2022 18:17:24 +0000 Subject: SERVER-68246 rewrite calls to boost::optional get and is_initialized --- src/mongo/db/query/planner_analysis.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mongo/db/query/planner_analysis.cpp') 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 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); -- cgit v1.2.1