diff options
Diffstat (limited to 'src/mongo/db/exec/sort.cpp')
-rw-r--r-- | src/mongo/db/exec/sort.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/db/exec/sort.cpp b/src/mongo/db/exec/sort.cpp index 9bf39c08773..13f1615ee11 100644 --- a/src/mongo/db/exec/sort.cpp +++ b/src/mongo/db/exec/sort.cpp @@ -37,7 +37,6 @@ #include "mongo/db/catalog/collection.h" #include "mongo/db/exec/scoped_timer.h" #include "mongo/db/exec/working_set_common.h" -#include "mongo/db/exec/working_set_computed_data.h" #include "mongo/db/index/btree_key_generator.h" #include "mongo/db/index_names.h" #include "mongo/db/query/find_common.h" @@ -126,11 +125,9 @@ PlanStage::StageState SortStage::doWork(WorkingSetID* out) { SortableDataItem item; item.wsid = id; - // We extract the sort key from the WSM's computed data. This must have been generated - // by a SortKeyGeneratorStage descendent in the execution tree. - auto sortKeyComputedData = - static_cast<const SortKeyComputedData*>(member->getComputed(WSM_SORT_KEY)); - item.sortKey = sortKeyComputedData->getSortKey(); + // We extract the sort key from the WSM's metadata. This must have been generated by a + // SortKeyGeneratorStage descendent in the execution tree. + item.sortKey = member->metadata().getSortKey(); if (member->hasRecordId()) { // The RecordId breaks ties when sorting two WSMs with the same sort key. |