summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/projection_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/projection_executor.cpp')
-rw-r--r--src/mongo/db/exec/projection_executor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/exec/projection_executor.cpp b/src/mongo/db/exec/projection_executor.cpp
index 29192f19547..19a7fd7eb55 100644
--- a/src/mongo/db/exec/projection_executor.cpp
+++ b/src/mongo/db/exec/projection_executor.cpp
@@ -252,6 +252,7 @@ auto buildProjectionExecutor(boost::intrusive_ptr<ExpressionContext> expCtx,
ProjectionExecutorVisitor<Executor> executorVisitor{&context};
projection_ast::PathTrackingWalker walker{&context, {&executorVisitor}, {}};
projection_ast_walker::walk(&walker, root);
+ context.data().executor->optimize();
return std::move(context.data().executor);
}
} // namespace