diff options
author | David Percy <david.percy@mongodb.com> | 2020-12-01 21:56:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-26 17:44:59 +0000 |
commit | dc1c3a791f63dfb909ed520aadab66a4b1ce66e9 (patch) | |
tree | f981eb0e1ee4958e0663cdc1c0ee7169ec67468d /src/mongo/db/pipeline/document_source_add_fields.h | |
parent | 31b07a007b80975852f75b43ba3437782825bf23 (diff) | |
download | mongo-dc1c3a791f63dfb909ed520aadab66a4b1ce66e9.tar.gz |
SERVER-53397 Desugar $setWindowFields partitionBy using $sort
Diffstat (limited to 'src/mongo/db/pipeline/document_source_add_fields.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_add_fields.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_add_fields.h b/src/mongo/db/pipeline/document_source_add_fields.h index 5c99a3790bb..49cb228c73b 100644 --- a/src/mongo/db/pipeline/document_source_add_fields.h +++ b/src/mongo/db/pipeline/document_source_add_fields.h @@ -53,6 +53,16 @@ public: StringData stageName = kStageName); /** + * Create a stage that binds an expression to a top-level field. + * + * 'fieldPath' must be a top-level field name (exactly one element; no dots). + */ + static boost::intrusive_ptr<DocumentSource> create( + const FieldPath& fieldPath, + const boost::intrusive_ptr<Expression>& expr, + const boost::intrusive_ptr<ExpressionContext>& expCtx); + + /** * Parses a $addFields stage from the user-supplied BSON. */ static boost::intrusive_ptr<DocumentSource> createFromBson( |