diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2016-08-04 12:49:28 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2016-08-04 12:49:28 -0400 |
commit | 5149b0f8a55085808cc6e34dcba491f2278ec3cf (patch) | |
tree | 1458da2e0bdbd08c0df57bdb60ce267614252d6c /src/mongo/db/pipeline/expression_context.h | |
parent | ad86d29a2cc93144dd2a143feaac415aa062ab99 (diff) | |
download | mongo-5149b0f8a55085808cc6e34dcba491f2278ec3cf.tar.gz |
SERVER-25005 Use Pipeline to execute $lookup and $graphLookup.
Replaces the usages of DBDirectClient::query() in DocumentSourceLookUp
and DocumentSourceGraphLookUp to instead parse and execute a Pipeline.
Simplifies the registration process of the "inner" plan execution in an
aggregation pipeline. The DocumentSourceCursor class now owns its
PlanExecutor and the PipelineProxyStage class no longer has a
std::weak_ptr to it. The "inner" plan executor is registered with the
CursorManager of the underlying Collection and will receive invalidation
notifications if a catalog operation occurs.
Diffstat (limited to 'src/mongo/db/pipeline/expression_context.h')
-rw-r--r-- | src/mongo/db/pipeline/expression_context.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/expression_context.h b/src/mongo/db/pipeline/expression_context.h index 285318f7f7a..27708590b18 100644 --- a/src/mongo/db/pipeline/expression_context.h +++ b/src/mongo/db/pipeline/expression_context.h @@ -68,6 +68,12 @@ public: return _valueComparator; } + /** + * Returns an ExpressionContext that is identical to 'this' that can be used to execute a + * separate aggregation pipeline on 'ns'. + */ + boost::intrusive_ptr<ExpressionContext> copyWith(NamespaceString ns) const; + bool isExplain = false; bool inShard = false; bool inRouter = false; @@ -81,7 +87,7 @@ public: // Collation requested by the user for this pipeline. Empty if the user did not request a // collation. - const BSONObj collation; + BSONObj collation; static const int kInterruptCheckPeriod = 128; int interruptCounter = kInterruptCheckPeriod; // when 0, check interruptStatus |