diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2020-10-29 12:14:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-07 11:20:50 +0000 |
commit | 90c89d33c400d2f1eb8972170b7a17e3315c4198 (patch) | |
tree | 2aaee3468e4350950b546b2b24783d9ddc2d8e2e /src/mongo/db/views/resolved_view.cpp | |
parent | 66cdb6d0fccf3b65c61a1bea5d6171591d21c9da (diff) | |
download | mongo-90c89d33c400d2f1eb8972170b7a17e3315c4198.tar.gz |
SERVER-51649 Convert aggregate command input to IDL
Diffstat (limited to 'src/mongo/db/views/resolved_view.cpp')
-rw-r--r-- | src/mongo/db/views/resolved_view.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/views/resolved_view.cpp b/src/mongo/db/views/resolved_view.cpp index 5bb17093d21..bccc3562d06 100644 --- a/src/mongo/db/views/resolved_view.cpp +++ b/src/mongo/db/views/resolved_view.cpp @@ -33,7 +33,6 @@ #include "mongo/base/init.h" #include "mongo/bson/bsonobjbuilder.h" -#include "mongo/db/pipeline/aggregation_request.h" #include "mongo/rpc/get_status_from_command_result.h" namespace mongo { @@ -87,8 +86,7 @@ std::shared_ptr<const ErrorExtraInfo> ResolvedView::parse(const BSONObj& cmdRepl return std::make_shared<ResolvedView>(fromBSON(cmdReply)); } -AggregationRequest ResolvedView::asExpandedViewAggregation( - const AggregationRequest& request) const { +AggregateCommand ResolvedView::asExpandedViewAggregation(const AggregateCommand& request) const { // Perform the aggregation on the resolved namespace. The new pipeline consists of two parts: // first, 'pipeline' in this ResolvedView; then, the pipeline in 'request'. std::vector<BSONObj> resolvedPipeline; @@ -97,7 +95,7 @@ AggregationRequest ResolvedView::asExpandedViewAggregation( resolvedPipeline.insert( resolvedPipeline.end(), request.getPipeline().begin(), request.getPipeline().end()); - AggregationRequest expandedRequest{_namespace, resolvedPipeline}; + AggregateCommand expandedRequest{_namespace, resolvedPipeline}; if (request.getExplain()) { expandedRequest.setExplain(request.getExplain()); @@ -109,10 +107,10 @@ AggregationRequest ResolvedView::asExpandedViewAggregation( expandedRequest.setMaxTimeMS(request.getMaxTimeMS()); expandedRequest.setReadConcern(request.getReadConcern()); expandedRequest.setUnwrappedReadPref(request.getUnwrappedReadPref()); - expandedRequest.setBypassDocumentValidation(request.shouldBypassDocumentValidation()); - expandedRequest.setAllowDiskUse(request.shouldAllowDiskUse()); + expandedRequest.setBypassDocumentValidation(request.getBypassDocumentValidation()); + expandedRequest.setAllowDiskUse(request.getAllowDiskUse()); expandedRequest.setIsMapReduceCommand(request.getIsMapReduceCommand()); - expandedRequest.setLetParameters(request.getLetParameters()); + expandedRequest.setLet(request.getLet()); // Operations on a view must always use the default collation of the view. We must have already // checked that if the user's request specifies a collation, it matches the collation of the |