summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/parsed_projection.cpp
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-09-05 23:54:44 +0000
committerevergreen <evergreen@mongodb.com>2019-09-05 23:54:44 +0000
commitbccfc2fdbdf32303cd93f06222a57b51c7c4cb6f (patch)
tree734e2b12c17c3dd809b192c43ba64a2d63407ee6 /src/mongo/db/query/parsed_projection.cpp
parent08a9563d5cd737ac94a4f665ed515cfc4e56cc1d (diff)
downloadmongo-bccfc2fdbdf32303cd93f06222a57b51c7c4cb6f.tar.gz
SERVER-42416 Move returnKey execution code to separate PlanStage
Diffstat (limited to 'src/mongo/db/query/parsed_projection.cpp')
-rw-r--r--src/mongo/db/query/parsed_projection.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/mongo/db/query/parsed_projection.cpp b/src/mongo/db/query/parsed_projection.cpp
index 359ad5c23d8..165a27e66bb 100644
--- a/src/mongo/db/query/parsed_projection.cpp
+++ b/src/mongo/db/query/parsed_projection.cpp
@@ -56,8 +56,6 @@ Status ParsedProjection::make(OperationContext* opCtx,
IncludeExclude includeExclude = IncludeExclude::kUninitialized;
bool requiresDocument = false;
- bool hasIndexKeyProjection = false;
-
bool wantTextScore = false;
bool wantGeoNearPoint = false;
bool wantGeoNearDistance = false;
@@ -161,7 +159,6 @@ Status ParsedProjection::make(OperationContext* opCtx,
if (e2.valuestr() != QueryRequest::metaTextScore &&
e2.valuestr() != QueryRequest::metaRecordId &&
- e2.valuestr() != QueryRequest::metaIndexKey &&
e2.valuestr() != QueryRequest::metaGeoNearDistance &&
e2.valuestr() != QueryRequest::metaGeoNearPoint &&
e2.valuestr() != QueryRequest::metaSortKey) {
@@ -171,8 +168,6 @@ Status ParsedProjection::make(OperationContext* opCtx,
// This clobbers everything else.
if (e2.valuestr() == QueryRequest::metaTextScore) {
wantTextScore = true;
- } else if (e2.valuestr() == QueryRequest::metaIndexKey) {
- hasIndexKeyProjection = true;
} else if (e2.valuestr() == QueryRequest::metaGeoNearDistance) {
wantGeoNearDistance = true;
} else if (e2.valuestr() == QueryRequest::metaGeoNearPoint) {
@@ -268,7 +263,6 @@ Status ParsedProjection::make(OperationContext* opCtx,
// Save the raw spec. It should be owned by the QueryRequest.
verify(spec.isOwned());
pp->_source = spec;
- pp->_returnKey = hasIndexKeyProjection;
pp->_requiresDocument = requiresDocument;
// Add meta-projections.
@@ -308,11 +302,6 @@ Status ParsedProjection::make(OperationContext* opCtx,
}
}
- // returnKey clobbers everything except for sortKey meta-projection.
- if (hasIndexKeyProjection && !wantSortKey) {
- pp->_requiresDocument = false;
- }
-
*out = pp.release();
return Status::OK();
}