DocumentSourceGraphLookUp::DocumentSourceGraphLookUp(
    NamespaceString from,
    std::string as,
    std::string connectFromField,
    std::string connectToField,
    boost::intrusive_ptr<Expression> startWith,
    boost::optional<BSONObj> additionalFilter,
    boost::optional<FieldPath> depthField,
    boost::optional<long long> maxDepth,
    const boost::intrusive_ptr<ExpressionContext>& expCtx)
    : DocumentSourceNeedsMongod(expCtx),
      _from(std::move(from)),
      _as(std::move(as)),
      _connectFromField(std::move(connectFromField)),
      _connectToField(std::move(connectToField)),
      _startWith(std::move(startWith)),
      _additionalFilter(additionalFilter),
      _depthField(depthField),
      _maxDepth(maxDepth),
      _visited(ValueComparator::kInstance.makeUnorderedValueMap<BSONObj>()),
      _cache(expCtx->getValueComparator()) {}
AccumulatorAddToSet::AccumulatorAddToSet(const boost::intrusive_ptr<ExpressionContext>& expCtx)
    : Accumulator(expCtx), _set(expCtx->getValueComparator().makeUnorderedValueSet()) {
    _memUsageBytes = sizeof(*this);
}