diff options
author | Katherine Wu <katherine.wu@mongodb.com> | 2021-01-24 17:04:01 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-24 04:23:59 +0000 |
commit | d32cb4b3d8f475caee2b2458ff65e5aca3530b41 (patch) | |
tree | db5373be5c7e67ff8fb44d40dc4f609e6e93a540 /src/mongo/db/commands/run_aggregate.cpp | |
parent | 5aa7b616740041902f232480967793a6745faa4e (diff) | |
download | mongo-d32cb4b3d8f475caee2b2458ff65e5aca3530b41.tar.gz |
SERVER-53483 Map predicates on time and regular fields to predicates on control's min/max
Diffstat (limited to 'src/mongo/db/commands/run_aggregate.cpp')
-rw-r--r-- | src/mongo/db/commands/run_aggregate.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index 344e3462d75..fe536e06399 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -518,15 +518,16 @@ std::vector<std::unique_ptr<Pipeline, PipelineDeleter>> createExchangePipelinesI } /** - * Performs validations related to API versioning before running the aggregation command. - * Throws uassert if any of the validations fails - * - validation on each stage on the pipeline - * - validation on 'AggregateCommand' request + * Performs validations related to API versioning and time-series stages. + * Throws UserAssertion if any of the validations fails + * - validation of API versioning on each stage on the pipeline + * - validation of API versioning on 'AggregateCommand' request + * - validation of time-series related stages */ -void performAPIVersionChecks(const OperationContext* opCtx, +void performValidationChecks(const OperationContext* opCtx, const AggregateCommand& request, const LiteParsedPipeline& liteParsedPipeline) { - liteParsedPipeline.validatePipelineStagesforAPIVersion(opCtx); + liteParsedPipeline.validate(opCtx); aggregation_request_helper::validateRequestForAPIVersion(opCtx, request); } @@ -548,9 +549,9 @@ Status runAggregate(OperationContext* opCtx, const BSONObj& cmdObj, const PrivilegeVector& privileges, rpc::ReplyBuilderInterface* result) { - - // Performs API versioning checks. - performAPIVersionChecks(opCtx, request, liteParsedPipeline); + // Perform some validations on the LiteParsedPipeline and request before continuing with the + // aggregation command. + performValidationChecks(opCtx, request, liteParsedPipeline); // For operations on views, this will be the underlying namespace. NamespaceString nss = request.getNamespace(); |