summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/expression_context.h')
-rw-r--r--src/mongo/db/pipeline/expression_context.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/expression_context.h b/src/mongo/db/pipeline/expression_context.h
index 4d4c0b75f3a..1d0f04dd1a0 100644
--- a/src/mongo/db/pipeline/expression_context.h
+++ b/src/mongo/db/pipeline/expression_context.h
@@ -40,6 +40,7 @@
#include "mongo/db/pipeline/aggregation_request.h"
#include "mongo/db/pipeline/document_comparator.h"
#include "mongo/db/pipeline/value_comparator.h"
+#include "mongo/db/pipeline/variables.h"
#include "mongo/db/query/collation/collator_interface.h"
#include "mongo/db/query/explain_options.h"
#include "mongo/util/intrusive_counter.h"
@@ -117,13 +118,13 @@ public:
// collation.
BSONObj collation;
+ Variables variables;
+ VariablesParseState variablesParseState;
+
protected:
static const int kInterruptCheckPeriod = 128;
- /**
- * Should only be used by 'ExpressionContextForTest'.
- */
- ExpressionContext() = default;
+ ExpressionContext() : variablesParseState(variables.useIdGenerator()) {}
/**
* Sets '_collator' and resets '_documentComparator' and '_valueComparator'.