summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/projection.cpp
diff options
context:
space:
mode:
authorHari Khalsa <hkhalsa@10gen.com>2013-09-23 10:42:41 -0400
committerHari Khalsa <hkhalsa@10gen.com>2013-09-23 19:28:10 -0400
commit44ae87438efc76040d93b039233d7f2ff4f46e3d (patch)
tree594ebd1e16c59e7a462cab61d0eab14046d9e181 /src/mongo/db/exec/projection.cpp
parent221b1d1c23cf66a6609e0e0c9ab63f23c0142b3a (diff)
downloadmongo-44ae87438efc76040d93b039233d7f2ff4f46e3d.tar.gz
SERVER-10471 covering and sort analysis. split projection parse from exec
Diffstat (limited to 'src/mongo/db/exec/projection.cpp')
-rw-r--r--src/mongo/db/exec/projection.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/exec/projection.cpp b/src/mongo/db/exec/projection.cpp
index f7e0edde052..fc2b81f6604 100644
--- a/src/mongo/db/exec/projection.cpp
+++ b/src/mongo/db/exec/projection.cpp
@@ -26,16 +26,18 @@
* it in the license file.
*/
+#include "mongo/db/exec/projection.h"
+
#include "mongo/db/diskloc.h"
#include "mongo/db/exec/plan_stage.h"
-#include "mongo/db/exec/projection.h"
+#include "mongo/db/exec/projection_executor.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression.h"
namespace mongo {
- ProjectionStage::ProjectionStage(QueryProjection* projection, WorkingSet* ws, PlanStage* child,
- const MatchExpression* filter)
+ ProjectionStage::ProjectionStage(ParsedProjection* projection, WorkingSet* ws, PlanStage* child,
+ const MatchExpression* filter)
: _projection(projection), _ws(ws), _child(child), _filter(filter) { }
ProjectionStage::~ProjectionStage() { }
@@ -51,7 +53,7 @@ namespace mongo {
if (PlanStage::ADVANCED == status) {
WorkingSetMember* member = _ws->get(id);
- Status status = _projection->project(member);
+ Status status = ProjectionExecutor::apply(_projection, member);
if (!status.isOK()) { return PlanStage::FAILURE; }
*out = id;
}