summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/sbe_expression_bm.cpp
diff options
context:
space:
mode:
authorDrew Paroski <drew.paroski@mongodb.com>2022-11-02 02:20:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-06 16:14:17 +0000
commit5b2eb1941168f8418cfdceb59493458e358deea5 (patch)
treec02712f13b0d147b6773ee7ec5893402bfe84fca /src/mongo/db/query/sbe_expression_bm.cpp
parent085aa724abcba8481860109593c70620915069e2 (diff)
downloadmongo-5b2eb1941168f8418cfdceb59493458e358deea5.tar.gz
SERVER-69875 De-stage-ify the SBE expression stage builder
Diffstat (limited to 'src/mongo/db/query/sbe_expression_bm.cpp')
-rw-r--r--src/mongo/db/query/sbe_expression_bm.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mongo/db/query/sbe_expression_bm.cpp b/src/mongo/db/query/sbe_expression_bm.cpp
index b8d0a957bd3..25f08e49976 100644
--- a/src/mongo/db/query/sbe_expression_bm.cpp
+++ b/src/mongo/db/query/sbe_expression_bm.cpp
@@ -92,10 +92,8 @@ public:
// expressions directly.
// It can be removed when stage_builder::generateExpressions
// always return EExpression.
- stage_builder::EvalStage bsonScanStage(
- std::make_unique<sbe::BSONScanStage>(
- convertToBson(documents), boost::make_optional(_inputSlotId), kEmptyPlanNodeId),
- {_inputSlotId});
+ auto stage = sbe::makeS<sbe::BSONScanStage>(
+ convertToBson(documents), boost::make_optional(_inputSlotId), kEmptyPlanNodeId);
stage_builder::StageBuilderState state{
opCtx.get(),
@@ -107,14 +105,10 @@ public:
false /* needsMerge */,
false /* allowDiskUse */
};
- auto [evalExpr, evalStage] =
- stage_builder::generateExpression(state,
- expression.get(),
- std::move(bsonScanStage),
- boost::make_optional(_inputSlotId),
- kEmptyPlanNodeId);
-
- auto stage = evalStage.extractStage(kEmptyPlanNodeId);
+
+ auto evalExpr = stage_builder::generateExpression(
+ state, expression.get(), boost::make_optional(_inputSlotId));
+
LOGV2_DEBUG(6979801,
1,
"sbe expression benchmark PlanStage",