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/s/query/cluster_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/s/query/cluster_aggregate.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_aggregate.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 7bd56463058..067a31ab52d 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -189,15 +189,16 @@ void updateHostsTargetedMetrics(OperationContext* opCtx, } /** - * 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); } @@ -217,8 +218,9 @@ Status ClusterAggregate::runAggregate(OperationContext* opCtx, const LiteParsedPipeline& liteParsedPipeline, const PrivilegeVector& privileges, BSONObjBuilder* result) { - // Perform API versioning validation checks. - performAPIVersionChecks(opCtx, request, liteParsedPipeline); + // Perform some validations on the LiteParsedPipeline and request before continuing with the + // aggregation command. + performValidationChecks(opCtx, request, liteParsedPipeline); uassert(51028, "Cannot specify exchange option to a mongos", !request.getExchange()); uassert(51143, |