summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_redact.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_redact.h')
-rw-r--r--src/mongo/db/pipeline/document_source_redact.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_redact.h b/src/mongo/db/pipeline/document_source_redact.h
index 10fcfc14f63..b566f2c7adf 100644
--- a/src/mongo/db/pipeline/document_source_redact.h
+++ b/src/mongo/db/pipeline/document_source_redact.h
@@ -72,6 +72,16 @@ public:
return _expression;
}
+ DepsTracker::State getDependencies(DepsTracker* deps) const final {
+ // Add the dependencies of the expression but all we really care about is variable
+ // references for correlation analysis. The field references may get populated but we'll
+ // still require the full document since the $redact may descend arbitrary levels of nested
+ // documents that is only known at runtime.
+ _expression->addDependencies(deps);
+ deps->needWholeDocument = true;
+ return DepsTracker::State::SEE_NEXT;
+ }
+
private:
DocumentSourceRedact(const boost::intrusive_ptr<ExpressionContext>& expCtx,
const boost::intrusive_ptr<Expression>& previsit);