summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/projection.h
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-10-11 20:13:48 +0000
committerevergreen <evergreen@mongodb.com>2019-10-11 20:13:48 +0000
commit70383ed065e8798aafc4394af7c6d2ac92927f41 (patch)
tree6f7f64aea51387ed436efd36fdc24e6932489be1 /src/mongo/db/exec/projection.h
parent34719559a9ec4bd494a59d269d227d06b086affb (diff)
downloadmongo-70383ed065e8798aafc4394af7c6d2ac92927f41.tar.gz
SERVER-42423 Use ProjectionExecutor in ProjectionStageDefault
Diffstat (limited to 'src/mongo/db/exec/projection.h')
-rw-r--r--src/mongo/db/exec/projection.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mongo/db/exec/projection.h b/src/mongo/db/exec/projection.h
index e4ad2ef8af6..5b368750cad 100644
--- a/src/mongo/db/exec/projection.h
+++ b/src/mongo/db/exec/projection.h
@@ -30,15 +30,13 @@
#pragma once
#include "mongo/db/exec/plan_stage.h"
-#include "mongo/db/exec/projection_exec.h"
+#include "mongo/db/exec/projection_executor.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression.h"
+#include "mongo/db/query/projection_ast.h"
#include "mongo/db/record_id.h"
namespace mongo {
-
-class CollatorInterface;
-
/**
* This stage computes a projection. This is an abstract base class for various projection
* implementations.
@@ -101,12 +99,11 @@ public:
/**
* ProjectionNodeDefault should use this for construction.
*/
- ProjectionStageDefault(OperationContext* opCtx,
+ ProjectionStageDefault(boost::intrusive_ptr<ExpressionContext> expCtx,
const BSONObj& projObj,
+ const projection_ast::Projection* projection,
WorkingSet* ws,
- std::unique_ptr<PlanStage> child,
- const MatchExpression& fullExpression,
- const CollatorInterface* collator);
+ std::unique_ptr<PlanStage> child);
StageType stageType() const final {
return STAGE_PROJECTION_DEFAULT;
@@ -115,8 +112,10 @@ public:
private:
Status transform(WorkingSetMember* member) const final;
- // Fully-general heavy execution object.
- ProjectionExec _exec;
+ // True, if the projection contains a recordId $meta expression.
+ const bool _wantRecordId;
+ const projection_ast::ProjectType _projectType;
+ std::unique_ptr<parsed_aggregation_projection::ParsedAggregationProjection> _executor;
};
/**