diff options
author | Drew Paroski <drew.paroski@mongodb.com> | 2022-11-02 02:20:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-06 16:14:17 +0000 |
commit | 5b2eb1941168f8418cfdceb59493458e358deea5 (patch) | |
tree | c02712f13b0d147b6773ee7ec5893402bfe84fca /src/mongo/db/query/sbe_expression_bm.cpp | |
parent | 085aa724abcba8481860109593c70620915069e2 (diff) | |
download | mongo-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.cpp | 18 |
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", |