diff options
author | David Storch <david.storch@mongodb.com> | 2020-08-25 18:34:54 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-31 21:53:09 +0000 |
commit | c70016c56f4f34ba09f4975fbf5bb3ac5129b5f7 (patch) | |
tree | c68f8e2c539246ef00a9abc4dfee16e667024dac /src/mongo/dbtests/query_stage_sort.cpp | |
parent | 5360e4bd5724440676017d17f6878852753e4bac (diff) | |
download | mongo-c70016c56f4f34ba09f4975fbf5bb3ac5129b5f7.tar.gz |
SERVER-48477 move CRUD interface into PlanExecutor
This allows classic PlanStages to be removed from the
PlanExecutor interface. It also positions the code base well
for adding SBE support for all of the CRUD commands.
Diffstat (limited to 'src/mongo/dbtests/query_stage_sort.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_sort.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mongo/dbtests/query_stage_sort.cpp b/src/mongo/dbtests/query_stage_sort.cpp index 4e14c38fec9..bf3353d698b 100644 --- a/src/mongo/dbtests/query_stage_sort.cpp +++ b/src/mongo/dbtests/query_stage_sort.cpp @@ -44,6 +44,7 @@ #include "mongo/db/exec/sort.h" #include "mongo/db/json.h" #include "mongo/db/query/plan_executor_factory.h" +#include "mongo/db/query/plan_executor_impl.h" #include "mongo/dbtests/dbtests.h" /** @@ -354,7 +355,13 @@ public: getRecordIds(&recordIds, coll); auto exec = makePlanExecutorWithSortStage(coll); - SortStage* ss = static_cast<SortStageDefault*>(exec->getRootStage()); + + // This test is specifically for the classic PlanStage execution engine, so assert that we + // have the right kind of PlanExecutor. + auto execImpl = dynamic_cast<PlanExecutorImpl*>(exec.get()); + ASSERT(execImpl); + + SortStage* ss = static_cast<SortStageDefault*>(execImpl->getRootStage()); SortKeyGeneratorStage* keyGenStage = static_cast<SortKeyGeneratorStage*>(ss->getChildren()[0].get()); QueuedDataStage* queuedDataStage = @@ -463,7 +470,13 @@ public: getRecordIds(&recordIds, coll); auto exec = makePlanExecutorWithSortStage(coll); - SortStage* ss = static_cast<SortStageDefault*>(exec->getRootStage()); + + // This test is specifically for the classic PlanStage execution engine, so assert that we + // have the right kind of PlanExecutor. + auto execImpl = dynamic_cast<PlanExecutorImpl*>(exec.get()); + ASSERT(execImpl); + + SortStage* ss = static_cast<SortStageDefault*>(execImpl->getRootStage()); SortKeyGeneratorStage* keyGenStage = static_cast<SortKeyGeneratorStage*>(ss->getChildren()[0].get()); QueuedDataStage* queuedDataStage = |