summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_add_fields.h
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2020-12-01 21:56:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-26 17:44:59 +0000
commitdc1c3a791f63dfb909ed520aadab66a4b1ce66e9 (patch)
treef981eb0e1ee4958e0663cdc1c0ee7169ec67468d /src/mongo/db/pipeline/document_source_add_fields.h
parent31b07a007b80975852f75b43ba3437782825bf23 (diff)
downloadmongo-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.h10
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(