diff options
author | David Storch <david.storch@10gen.com> | 2016-07-01 15:35:39 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-07-14 23:41:20 -0400 |
commit | 5e504b81ab84274db75f868cf1559cee015beddd (patch) | |
tree | 38ffd9247f3c95d47191065fa6e6c15a26c44289 /src/mongo/db/pipeline/document_source_unwind.cpp | |
parent | 751f67f4a6ff89f7b8b2475301e1976f4f583f95 (diff) | |
download | mongo-5e504b81ab84274db75f868cf1559cee015beddd.tar.gz |
SERVER-24508 DocumentComparator and ValueComparator
- Changes the Document/Value library to require comparisons
to be made in the context of a comparator object. This is
prep work for full collation support in the aggregation
system.
- Adds injectExpressionContext() to propagate the
ExpressionContext containing the comparator object to all
DocumentSource, Accumulator, and Expression instances
involved in the Pipeline.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_unwind.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_unwind.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_unwind.cpp b/src/mongo/db/pipeline/document_source_unwind.cpp index b02723c1c94..82bb8f3adbe 100644 --- a/src/mongo/db/pipeline/document_source_unwind.cpp +++ b/src/mongo/db/pipeline/document_source_unwind.cpp @@ -174,11 +174,13 @@ intrusive_ptr<DocumentSourceUnwind> DocumentSourceUnwind::create( const string& unwindPath, bool preserveNullAndEmptyArrays, const boost::optional<string>& indexPath) { - return new DocumentSourceUnwind(expCtx, - FieldPath(unwindPath), - preserveNullAndEmptyArrays, - indexPath ? FieldPath(*indexPath) - : boost::optional<FieldPath>()); + intrusive_ptr<DocumentSourceUnwind> source( + new DocumentSourceUnwind(expCtx, + FieldPath(unwindPath), + preserveNullAndEmptyArrays, + indexPath ? FieldPath(*indexPath) : boost::optional<FieldPath>())); + source->injectExpressionContext(expCtx); + return source; } boost::optional<Document> DocumentSourceUnwind::getNext() { |