diff options
author | Benjamin Murphy <benjamin_murphy@me.com> | 2016-03-30 16:15:23 -0400 |
---|---|---|
committer | Benjamin Murphy <benjamin_murphy@me.com> | 2016-04-21 11:12:32 -0400 |
commit | 1333f35d0f6060d5b053c6868cf0b701850ac155 (patch) | |
tree | 23a4959a3e4f4a58576cd0551a093bacdd17f5e8 /src/mongo/db/query/query_solution.h | |
parent | e07aa09634005f51787a724ef1c17ecbc1d9faf1 (diff) | |
download | mongo-1333f35d0f6060d5b053c6868cf0b701850ac155.tar.gz |
SERVER-23436 ProjectionNode::getSort propagates sort from children.
Diffstat (limited to 'src/mongo/db/query/query_solution.h')
-rw-r--r-- | src/mongo/db/query/query_solution.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h index 72feaca50b9..f64e5d263dc 100644 --- a/src/mongo/db/query/query_solution.h +++ b/src/mongo/db/query/query_solution.h @@ -496,7 +496,7 @@ struct ProjectionNode : public QuerySolutionNode { SIMPLE_DOC, }; - ProjectionNode() : fullExpression(NULL), projType(DEFAULT) {} + ProjectionNode(ParsedProjection proj) : fullExpression(NULL), projType(DEFAULT), parsed(proj) {} virtual ~ProjectionNode() {} @@ -504,6 +504,8 @@ struct ProjectionNode : public QuerySolutionNode { return STAGE_PROJECTION; } + virtual void computeProperties(); + virtual void appendToString(mongoutils::str::stream* ss, int indent) const; /** @@ -532,8 +534,6 @@ struct ProjectionNode : public QuerySolutionNode { } const BSONObjSet& getSort() const { - // TODO: If we're applying a projection that maintains sort order, the prefix of the - // sort order we project is the sort order. return _sorts; } @@ -552,6 +552,8 @@ struct ProjectionNode : public QuerySolutionNode { // What implementation of the projection algorithm should we use? ProjectionType projType; + ParsedProjection parsed; + // Only meaningful if projType == COVERED_ONE_INDEX. This is the key pattern of the index // supplying our covered data. We can pre-compute which fields to include and cache that // data for later if we know we only have one index. |