summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/canonical_query.cpp
diff options
context:
space:
mode:
authorAlexander Ignatyev <alexander.ignatyev@mongodb.com>2022-01-18 07:04:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-18 07:49:55 +0000
commit271b0ed95bb065a4c46a4da4e0ddd0dcf2799543 (patch)
treede6ca7fe7db6ab2769c4ff41343c4fb2b13525c2 /src/mongo/db/query/canonical_query.cpp
parent42da3b4e6a22aacc93c4cbb646c1cd332e6d4bcd (diff)
downloadmongo-271b0ed95bb065a4c46a4da4e0ddd0dcf2799543.tar.gz
SERVER-61420 Create MatchExpression visitor to set paramId on tree nodes
Diffstat (limited to 'src/mongo/db/query/canonical_query.cpp')
-rw-r--r--src/mongo/db/query/canonical_query.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp
index 037fb3f3715..3c0c557a289 100644
--- a/src/mongo/db/query/canonical_query.cpp
+++ b/src/mongo/db/query/canonical_query.cpp
@@ -204,6 +204,9 @@ Status CanonicalQuery::init(OperationContext* opCtx,
}
auto unavailableMetadata = validStatus.getValue();
_root = MatchExpression::normalize(std::move(root));
+ if (feature_flags::gFeatureFlagSbePlanCache.isEnabledAndIgnoreFCV()) {
+ MatchExpression::parameterize(_root.get());
+ }
// The tree must always be valid after normalization.
dassert(isValid(_root.get(), *_findCommand).isOK());
if (auto status = isValidNormalized(_root.get()); !status.isOK()) {