summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.cpp
diff options
context:
space:
mode:
authorIrina Yatsenko <irina.yatsenko@mongodb.com>2022-11-02 15:16:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-02 16:38:44 +0000
commit188f24f0d61b62b9b0601f5b890b4820d7570719 (patch)
tree4c0d7e2f339eed9de9f69bbffbb3127583ec4b8d /src/mongo/db/pipeline/expression.cpp
parentdc1497b1f1a2bba208f49aad3830223dcf01aadd (diff)
downloadmongo-188f24f0d61b62b9b0601f5b890b4820d7570719.tar.gz
SERVER-70944 precompute field hashes for ExpressionFieldPath
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r--src/mongo/db/pipeline/expression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index e87a39f85ac..080faffe5c3 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -2414,7 +2414,7 @@ intrusive_ptr<ExpressionFieldPath> ExpressionFieldPath::createVarFromString(
ExpressionFieldPath::ExpressionFieldPath(ExpressionContext* const expCtx,
const string& theFieldPath,
Variables::Id variable)
- : Expression(expCtx), _fieldPath(theFieldPath), _variable(variable) {
+ : Expression(expCtx), _fieldPath(theFieldPath, true /*precomputeHashes*/), _variable(variable) {
const auto varName = theFieldPath.substr(0, theFieldPath.find('.'));
tassert(5943201,
std::string{"Variable with $$ROOT's id is not $$CURRENT or $$ROOT as expected, "