summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/sort_key_generator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/sort_key_generator.cpp')
-rw-r--r--src/mongo/db/exec/sort_key_generator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/exec/sort_key_generator.cpp b/src/mongo/db/exec/sort_key_generator.cpp
index 7b846f18bad..90fe3b48fea 100644
--- a/src/mongo/db/exec/sort_key_generator.cpp
+++ b/src/mongo/db/exec/sort_key_generator.cpp
@@ -49,12 +49,13 @@ namespace mongo {
const char* SortKeyGeneratorStage::kStageType = "SORT_KEY_GENERATOR";
-SortKeyGeneratorStage::SortKeyGeneratorStage(OperationContext* opCtx,
+SortKeyGeneratorStage::SortKeyGeneratorStage(const boost::intrusive_ptr<ExpressionContext>& pExpCtx,
PlanStage* child,
WorkingSet* ws,
- const BSONObj& sortSpecObj,
- const CollatorInterface* collator)
- : PlanStage(kStageType, opCtx), _ws(ws), _sortKeyGen(sortSpecObj, collator) {
+ const BSONObj& sortSpecObj)
+ : PlanStage(kStageType, pExpCtx->opCtx),
+ _ws(ws),
+ _sortKeyGen({{sortSpecObj, pExpCtx}, pExpCtx->getCollator()}) {
_children.emplace_back(child);
}