diff options
author | Svilen Mihaylov <svilen.mihaylov@mongodb.com> | 2023-02-01 13:41:19 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-02 01:39:58 +0000 |
commit | fdbe64991bdbb3328050c034eb0a9dc10658bbc6 (patch) | |
tree | 01078d833474304c4aec98785fb824a695bd29c5 /src/mongo/db/pipeline/abt/match_expression_visitor.cpp | |
parent | e1e40c23d89cc051b017d45d962ab4ccbb35f77f (diff) | |
download | mongo-fdbe64991bdbb3328050c034eb0a9dc10658bbc6.tar.gz |
SERVER-73428 [CQF] Eliminate duplicate conversion from document value to sbe value
Diffstat (limited to 'src/mongo/db/pipeline/abt/match_expression_visitor.cpp')
-rw-r--r-- | src/mongo/db/pipeline/abt/match_expression_visitor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/abt/match_expression_visitor.cpp b/src/mongo/db/pipeline/abt/match_expression_visitor.cpp index efde147047e..fcd88189e19 100644 --- a/src/mongo/db/pipeline/abt/match_expression_visitor.cpp +++ b/src/mongo/db/pipeline/abt/match_expression_visitor.cpp @@ -28,6 +28,7 @@ */ #include "mongo/db/pipeline/abt/match_expression_visitor.h" +#include "mongo/db/exec/docval_to_sbeval.h" #include "mongo/db/matcher/expression_always_boolean.h" #include "mongo/db/matcher/expression_array.h" #include "mongo/db/matcher/expression_expr.h" @@ -201,7 +202,7 @@ public: arraysOnlyPtr->reserve(equalities.size()); for (const auto& pred : equalities) { - const auto [tag, val] = convertFrom(Value(pred)); + const auto [tag, val] = sbe::value::makeValue(Value(pred)); arrTraversePtr->push_back(tag, val); if (tag == sbe::value::TypeTags::Null) { @@ -520,7 +521,7 @@ private: void generateSimpleComparison(const ComparisonMatchExpressionBase* expr, const Operations op) { assertSupportedPathExpression(expr); - auto [tag, val] = convertFrom(Value(expr->getData())); + auto [tag, val] = sbe::value::makeValue(Value(expr->getData())); ABT result = make<PathCompare>(op, make<Constant>(tag, val)); bool tagNullMatchMissingField = |