diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-05-05 17:33:34 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-05-10 16:00:35 -0400 |
commit | 8f8043d6128813e9862b5a5c30a90d007d92c363 (patch) | |
tree | c5cf74eab1ad31f171b5fef90d39d4247df6b086 /src/mongo/db/pipeline/pipeline_d.cpp | |
parent | 87f738623ffe55535fde1462cda5d9715893e713 (diff) | |
download | mongo-8f8043d6128813e9862b5a5c30a90d007d92c363.tar.gz |
SERVER-24045 Refactor CanonicalQuery::canonicalize()
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_d.cpp')
-rw-r--r-- | src/mongo/db/pipeline/pipeline_d.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index e254603af3b..33f6cf104df 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -208,8 +208,12 @@ StatusWith<std::unique_ptr<PlanExecutor>> attemptToGetExecutor( const size_t plannerOpts) { const ExtensionsCallbackReal extensionsCallback(pExpCtx->opCtx, &pExpCtx->ns); - auto cq = CanonicalQuery::canonicalize( - txn, pExpCtx->ns, queryObj, sortObj, projectionObj, extensionsCallback); + auto lpq = stdx::make_unique<LiteParsedQuery>(pExpCtx->ns); + lpq->setFilter(queryObj); + lpq->setSort(sortObj); + lpq->setProj(projectionObj); + + auto cq = CanonicalQuery::canonicalize(txn, std::move(lpq), extensionsCallback); if (!cq.isOK()) { // Return an error instead of uasserting, since there are cases where the combination of |