summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/sort.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2019-07-19 18:30:33 -0400
committerDavid Storch <david.storch@10gen.com>2019-07-26 16:05:59 -0400
commit94fcb7d03e08014bb6a20ab010539811548d9e83 (patch)
treee44d2d923f59e0430645a13c3844f367cfa1bdb3 /src/mongo/db/exec/sort.cpp
parentdc4db514a1ee737db0553f9535033453502b3ac7 (diff)
downloadmongo-94fcb7d03e08014bb6a20ab010539811548d9e83.tar.gz
SERVER-42288 Consolidate Document and WorkingSetMember metadata implementations.
Diffstat (limited to 'src/mongo/db/exec/sort.cpp')
-rw-r--r--src/mongo/db/exec/sort.cpp9
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.