summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_densify.h
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2021-11-19 22:46:15 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-22 22:57:25 +0000
commita39a201c7c6991132494187f25e34151db1ef5c7 (patch)
treebc145e0a8540522a2fb42275497ab0a467e83cce /src/mongo/db/pipeline/document_source_densify.h
parenta0ca381d51c085a0ba3299b2086ae7663cc29f45 (diff)
downloadmongo-a39a201c7c6991132494187f25e34151db1ef5c7.tar.gz
SERVER-61548 Handle dotted partitionByFields in $densify
Diffstat (limited to 'src/mongo/db/pipeline/document_source_densify.h')
-rw-r--r--src/mongo/db/pipeline/document_source_densify.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source_densify.h b/src/mongo/db/pipeline/document_source_densify.h
index b4e6ff16a37..24c44b52922 100644
--- a/src/mongo/db/pipeline/document_source_densify.h
+++ b/src/mongo/db/pipeline/document_source_densify.h
@@ -542,7 +542,11 @@ private:
boost::optional<DensifyValue> _globalMin = boost::none;
boost::optional<DensifyValue> _globalMax = boost::none;
- // Expression to be used to compare partitions.
+ // _partitionExpr has two purposes:
+ // 1. to determine which partition a document belongs in.
+ // 2. to initialize new documents with the right partition key.
+ // For example, if the stage had 'partitionByFields: ["a", "x.y"]' then this expression
+ // would be {a: "$a", {x: {y: "$x.y"}}}.
boost::intrusive_ptr<ExpressionObject> _partitionExpr;
bool _eof = false;