diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-09-05 23:54:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-05 23:54:44 +0000 |
commit | bccfc2fdbdf32303cd93f06222a57b51c7c4cb6f (patch) | |
tree | 734e2b12c17c3dd809b192c43ba64a2d63407ee6 /src/mongo/db/query/parsed_projection.cpp | |
parent | 08a9563d5cd737ac94a4f665ed515cfc4e56cc1d (diff) | |
download | mongo-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.cpp | 11 |
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(); } |