diff options
author | Andrii Dobroshynski <andrii.dobroshynski@mongodb.com> | 2021-08-17 15:47:17 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-17 17:04:21 +0000 |
commit | 26bcd0f788184402ecefdc1221faf13a1f9b6e47 (patch) | |
tree | b02aea576ca6073006adab7dcaee6d0e8a4b7a23 /src/mongo/embedded | |
parent | 9f329ae9bb1c2f3e9e4eb0b0114c3eb6a3627d52 (diff) | |
download | mongo-26bcd0f788184402ecefdc1221faf13a1f9b6e47.tar.gz |
SERVER-57749 Optimize a projection expression prior to planning for 'find'
Diffstat (limited to 'src/mongo/embedded')
-rw-r--r-- | src/mongo/embedded/stitch_support/stitch_support.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/embedded/stitch_support/stitch_support.cpp b/src/mongo/embedded/stitch_support/stitch_support.cpp index f6979228d14..55ee18eeaa4 100644 --- a/src/mongo/embedded/stitch_support/stitch_support.cpp +++ b/src/mongo/embedded/stitch_support/stitch_support.cpp @@ -189,12 +189,12 @@ struct stitch_support_v1_projection { collator ? collator->collator->clone() : nullptr, mongo::kDummyNamespaceStr); const auto policies = mongo::ProjectionPolicies::findProjectionPolicies(); - auto proj = - mongo::projection_ast::parse(expCtx, - pattern, - matcher ? matcher->matcher.getMatchExpression() : nullptr, - matcher ? *matcher->matcher.getQuery() : mongo::BSONObj(), - policies); + auto proj = mongo::projection_ast::parseAndAnalyze( + expCtx, + pattern, + matcher ? matcher->matcher.getMatchExpression() : nullptr, + matcher ? *matcher->matcher.getQuery() : mongo::BSONObj(), + policies); uassert(51051, "$textScore, $sortKey, $recordId and $geoNear are not allowed in this " |