diff options
author | Qingyang Chen <qingyang.chen@10gen.com> | 2015-06-19 17:20:36 -0400 |
---|---|---|
committer | Qingyang Chen <qingyang.chen@10gen.com> | 2015-06-26 10:10:34 -0400 |
commit | 159f54fcb550d6ff660efd2832ac5ae8b6fced56 (patch) | |
tree | 2b6ac085b3375ce151d92fa1db9b4a38d92da25f /src/mongo/db/commands/distinct.cpp | |
parent | 2931e33f4d6efb3aa176eaa951be6c91abce2b43 (diff) | |
download | mongo-159f54fcb550d6ff660efd2832ac5ae8b6fced56.tar.gz |
SERVER-16889 Modernize getExecutor*(), PlanExecutor::make() signatures
Diffstat (limited to 'src/mongo/db/commands/distinct.cpp')
-rw-r--r-- | src/mongo/db/commands/distinct.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 2c281140c63..9fb1214234c 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -123,17 +123,16 @@ public: return true; } - PlanExecutor* rawExec; - Status status = - getExecutorDistinct(txn, collection, query, key, PlanExecutor::YIELD_AUTO, &rawExec); - if (!status.isOK()) { + auto statusWithPlanExecutor = + getExecutorDistinct(txn, collection, query, key, PlanExecutor::YIELD_AUTO); + if (!statusWithPlanExecutor.isOK()) { uasserted(17216, mongoutils::str::stream() << "Can't get executor for query " << query << ": " - << status.toString()); + << statusWithPlanExecutor.getStatus().toString()); return 0; } - unique_ptr<PlanExecutor> exec(rawExec); + unique_ptr<PlanExecutor> exec = std::move(statusWithPlanExecutor.getValue()); BSONObj obj; PlanExecutor::ExecState state; @@ -165,7 +164,7 @@ public: // Get summary information about the plan. PlanSummaryStats stats; - Explain::getSummaryStats(exec.get(), &stats); + Explain::getSummaryStats(*exec, &stats); verify(start == bb.buf()); |