summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/planner_wildcard_helpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/planner_wildcard_helpers.cpp')
-rw-r--r--src/mongo/db/query/planner_wildcard_helpers.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/query/planner_wildcard_helpers.cpp b/src/mongo/db/query/planner_wildcard_helpers.cpp
index 43f4ab69bb3..edf768c75a3 100644
--- a/src/mongo/db/query/planner_wildcard_helpers.cpp
+++ b/src/mongo/db/query/planner_wildcard_helpers.cpp
@@ -36,6 +36,7 @@
#include <vector>
#include "mongo/bson/util/builder.h"
+#include "mongo/db/exec/projection_executor_utils.h"
#include "mongo/db/index/wildcard_key_generator.h"
#include "mongo/db/query/index_bounds.h"
#include "mongo/util/log.h"
@@ -355,13 +356,12 @@ void expandWildcardIndexEntry(const IndexEntry& wildcardIndex,
invariant(wildcardIndex.multikeyPaths.empty());
// Obtain the projection executor from the parent wildcard IndexEntry.
- const auto* projExec = wildcardIndex.wildcardProjection;
+ auto projExec = wildcardIndex.wildcardProjection;
invariant(projExec);
- const auto projectedFields = projExec->applyProjectionToFields(fields);
-
- const auto& includedPaths = projExec->getExhaustivePaths();
-
+ const auto projectedFields =
+ projection_executor_utils::applyProjectionToFields(projExec, fields);
+ const auto& includedPaths = projection_executor_utils::extractExhaustivePaths(projExec);
out->reserve(out->size() + projectedFields.size());
for (auto&& fieldName : projectedFields) {
// Convert string 'fieldName' into a FieldRef, to better facilitate the subsequent checks.