summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_sort.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2020-08-25 18:34:54 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-31 21:53:09 +0000
commitc70016c56f4f34ba09f4975fbf5bb3ac5129b5f7 (patch)
treec68f8e2c539246ef00a9abc4dfee16e667024dac /src/mongo/dbtests/query_stage_sort.cpp
parent5360e4bd5724440676017d17f6878852753e4bac (diff)
downloadmongo-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.cpp17
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 =