diff options
Diffstat (limited to 'src/mongo/db/pipeline/expression.h')
-rw-r--r-- | src/mongo/db/pipeline/expression.h | 167 |
1 files changed, 82 insertions, 85 deletions
diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h index 62bf6904fc5..0bb366223a3 100644 --- a/src/mongo/db/pipeline/expression.h +++ b/src/mongo/db/pipeline/expression.h @@ -108,19 +108,15 @@ public: * This method should only be used for testing. */ Value evaluate(const Document& root) const { - Variables vars(0, root); - return evaluate(&vars); + getExpressionContext()->variables.setRoot(root); + return evaluate(); } /** - * Evaluate expression with variables given by 'vars', and return the result. - * - * While vars is non-const, a subexpression's modifications to it should not effect outer - * Expressions, since variables defined in the subexpression's scope will be given unique - * variable ids. + * Evaluate expression and return the result. */ - Value evaluate(Variables* vars) const { - return evaluateInternal(vars); + Value evaluate() const { + return evaluateInternal(); } /** @@ -168,12 +164,13 @@ public: */ static std::string removeFieldPrefix(const std::string& prefixedField); - /** Evaluate the subclass Expression using the given Variables as context and return result. + /** + * Evaluate the subclass Expression and return result. * * Should only be called by subclasses, but can't be protected because they need to call * this function on each other. */ - virtual Value evaluateInternal(Variables* vars) const = 0; + virtual Value evaluateInternal() const = 0; /** * Registers an Parser so it can be called from parseExpression. @@ -323,13 +320,13 @@ public: explicit ExpressionFromAccumulator(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionFromAccumulator<Accumulator>>(expCtx) {} - Value evaluateInternal(Variables* vars) const final { + Value evaluateInternal() const final { Accumulator accum(this->getExpressionContext()); const size_t n = this->vpOperand.size(); // If a single array arg is given, loop through it passing each member to the accumulator. // If a single, non-array arg is given, pass it directly to the accumulator. if (n == 1) { - Value singleVal = this->vpOperand[0]->evaluateInternal(vars); + Value singleVal = this->vpOperand[0]->evaluateInternal(); if (singleVal.getType() == Array) { for (const Value& val : singleVal.getArray()) { accum.process(val, false); @@ -340,7 +337,7 @@ public: } else { // If multiple arguments are given, pass all arguments to the accumulator. for (auto&& argument : this->vpOperand) { - accum.process(argument->evaluateInternal(vars), false); + accum.process(argument->evaluateInternal(), false); } } return accum.getValue(false); @@ -375,8 +372,8 @@ public: virtual ~ExpressionSingleNumericArg() {} - Value evaluateInternal(Variables* vars) const final { - Value arg = this->vpOperand[0]->evaluateInternal(vars); + Value evaluateInternal() const final { + Value arg = this->vpOperand[0]->evaluateInternal(); if (arg.nullish()) return Value(BSONNULL); @@ -407,7 +404,7 @@ public: explicit ExpressionAdd(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionAdd>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -425,7 +422,7 @@ public: explicit ExpressionAllElementsTrue(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionAllElementsTrue, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -436,7 +433,7 @@ public: : ExpressionVariadic<ExpressionAnd>(expCtx) {} boost::intrusive_ptr<Expression> optimize() final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -454,7 +451,7 @@ public: explicit ExpressionAnyElementTrue(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionAnyElementTrue, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -464,7 +461,7 @@ public: explicit ExpressionArray(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionArray>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; Value serialize(bool explain) const final; const char* getOpName() const final; }; @@ -475,7 +472,7 @@ public: explicit ExpressionArrayElemAt(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionArrayElemAt, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -484,7 +481,7 @@ public: explicit ExpressionObjectToArray(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionObjectToArray, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -493,7 +490,7 @@ public: explicit ExpressionArrayToObject(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionArrayToObject, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -511,7 +508,7 @@ class ExpressionCoerceToBool final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; Value serialize(bool explain) const final; static boost::intrusive_ptr<ExpressionCoerceToBool> create( @@ -545,7 +542,7 @@ public: ExpressionCompare(const boost::intrusive_ptr<ExpressionContext>& expCtx, CmpOp cmpOp) : ExpressionFixedArity<ExpressionCompare, 2>(expCtx), cmpOp(cmpOp) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static boost::intrusive_ptr<Expression> parse( @@ -570,7 +567,7 @@ public: explicit ExpressionConcat(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionConcat>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -584,7 +581,7 @@ public: explicit ExpressionConcatArrays(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionConcatArrays>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -597,7 +594,7 @@ class ExpressionCond final : public ExpressionFixedArity<ExpressionCond, 3> { public: explicit ExpressionCond(const boost::intrusive_ptr<ExpressionContext>& expCtx) : Base(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static boost::intrusive_ptr<Expression> parse( @@ -614,7 +611,7 @@ class ExpressionConstant final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; Value serialize(bool explain) const final; const char* getOpName() const; @@ -646,7 +643,7 @@ class ExpressionDateToString final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; Value serialize(bool explain) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; void addDependencies(DepsTracker* deps) const final; static boost::intrusive_ptr<Expression> parse( @@ -677,7 +674,7 @@ public: explicit ExpressionDayOfMonth(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionDayOfMonth, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static inline int extract(const tm& tm) { @@ -691,7 +688,7 @@ public: explicit ExpressionDayOfWeek(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionDayOfWeek, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; // MySQL uses 1-7, tm uses 0-6 @@ -706,7 +703,7 @@ public: explicit ExpressionDayOfYear(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionDayOfYear, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; // MySQL uses 1-366, tm uses 0-365 @@ -721,7 +718,7 @@ public: explicit ExpressionDivide(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionDivide, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -740,7 +737,7 @@ class ExpressionFieldPath final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; Value serialize(bool explain) const final; /* @@ -805,7 +802,7 @@ class ExpressionFilter final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; Value serialize(bool explain) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; void addDependencies(DepsTracker* deps) const final; static boost::intrusive_ptr<Expression> parse( @@ -846,7 +843,7 @@ public: explicit ExpressionHour(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionHour, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static inline int extract(const tm& tm) { @@ -860,7 +857,7 @@ public: explicit ExpressionIfNull(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIfNull, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -870,7 +867,7 @@ public: explicit ExpressionIn(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIn, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -880,7 +877,7 @@ public: explicit ExpressionIndexOfArray(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionRangedArity<ExpressionIndexOfArray, 2, 4>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -890,7 +887,7 @@ public: explicit ExpressionIndexOfBytes(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionRangedArity<ExpressionIndexOfBytes, 2, 4>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -903,7 +900,7 @@ public: explicit ExpressionIndexOfCP(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionRangedArity<ExpressionIndexOfCP, 2, 4>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -912,7 +909,7 @@ class ExpressionLet final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; Value serialize(bool explain) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; void addDependencies(DepsTracker* deps) const final; static boost::intrusive_ptr<Expression> parse( @@ -954,7 +951,7 @@ public: explicit ExpressionLog(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionLog, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -971,7 +968,7 @@ class ExpressionMap final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; Value serialize(bool explain) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; void addDependencies(DepsTracker* deps) const final; static boost::intrusive_ptr<Expression> parse( @@ -996,7 +993,7 @@ private: class ExpressionMeta final : public Expression { public: Value serialize(bool explain) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; void addDependencies(DepsTracker* deps) const final; static boost::intrusive_ptr<Expression> parse( @@ -1020,7 +1017,7 @@ public: explicit ExpressionMillisecond(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionMillisecond, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const long long date); @@ -1032,7 +1029,7 @@ public: explicit ExpressionMinute(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionMinute, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const tm& tm) { @@ -1046,7 +1043,7 @@ public: explicit ExpressionMod(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionMod, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1056,7 +1053,7 @@ public: explicit ExpressionMultiply(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionMultiply>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -1074,7 +1071,7 @@ public: explicit ExpressionMonth(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionMonth, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; // MySQL uses 1-12, tm uses 0-11 @@ -1089,7 +1086,7 @@ public: explicit ExpressionNot(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionNot, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1106,7 +1103,7 @@ class ExpressionObject final : public Expression { public: boost::intrusive_ptr<Expression> optimize() final; void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; Value serialize(bool explain) const final; static boost::intrusive_ptr<ExpressionObject> create( @@ -1146,7 +1143,7 @@ public: : ExpressionVariadic<ExpressionOr>(expCtx) {} boost::intrusive_ptr<Expression> optimize() final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -1167,7 +1164,7 @@ public: const boost::intrusive_ptr<ExpressionContext>& expCtx, Value base, Value exp); private: - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1177,7 +1174,7 @@ public: explicit ExpressionRange(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionRangedArity<ExpressionRange, 2, 3>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1188,7 +1185,7 @@ public: : Expression(expCtx) {} void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; boost::intrusive_ptr<Expression> optimize() final; static boost::intrusive_ptr<Expression> parse( const boost::intrusive_ptr<ExpressionContext>& expCtx, @@ -1211,7 +1208,7 @@ public: explicit ExpressionSecond(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSecond, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static inline int extract(const tm& tm) { @@ -1225,7 +1222,7 @@ public: explicit ExpressionSetDifference(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSetDifference, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1235,7 +1232,7 @@ public: explicit ExpressionSetEquals(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionSetEquals>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; void validateArguments(const ExpressionVector& args) const final; }; @@ -1246,7 +1243,7 @@ public: explicit ExpressionSetIntersection(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionSetIntersection>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -1266,7 +1263,7 @@ public: : ExpressionFixedArity<ExpressionSetIsSubset, 2>(expCtx) {} boost::intrusive_ptr<Expression> optimize() override; - Value evaluateInternal(Variables* vars) const override; + Value evaluateInternal() const override; const char* getOpName() const final; private: @@ -1279,7 +1276,7 @@ public: explicit ExpressionSetUnion(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionVariadic<ExpressionSetUnion>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; bool isAssociative() const final { @@ -1297,7 +1294,7 @@ public: explicit ExpressionSize(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSize, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1307,7 +1304,7 @@ public: explicit ExpressionReverseArray(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionReverseArray, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1317,7 +1314,7 @@ public: explicit ExpressionSlice(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionRangedArity<ExpressionSlice, 2, 3>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1327,7 +1324,7 @@ public: explicit ExpressionIsArray(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIsArray, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1337,7 +1334,7 @@ public: explicit ExpressionSplit(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSplit, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1357,7 +1354,7 @@ public: explicit ExpressionStrcasecmp(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionStrcasecmp, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1367,7 +1364,7 @@ public: explicit ExpressionSubstrBytes(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSubstrBytes, 3>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const; }; @@ -1377,7 +1374,7 @@ public: explicit ExpressionSubstrCP(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSubstrCP, 3>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1387,7 +1384,7 @@ public: explicit ExpressionStrLenBytes(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionStrLenBytes, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1397,7 +1394,7 @@ public: explicit ExpressionStrLenCP(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionStrLenCP, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1407,7 +1404,7 @@ public: explicit ExpressionSubtract(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionSubtract, 2>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1418,7 +1415,7 @@ public: : Expression(expCtx) {} void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; boost::intrusive_ptr<Expression> optimize() final; static boost::intrusive_ptr<Expression> parse( const boost::intrusive_ptr<ExpressionContext>& expCtx, @@ -1440,7 +1437,7 @@ public: explicit ExpressionToLower(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionToLower, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1450,7 +1447,7 @@ public: explicit ExpressionToUpper(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionToUpper, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1470,7 +1467,7 @@ public: explicit ExpressionType(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionType, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; }; @@ -1480,7 +1477,7 @@ public: explicit ExpressionWeek(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionWeek, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const tm& tm); @@ -1492,7 +1489,7 @@ public: explicit ExpressionIsoWeekYear(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIsoWeekYear, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const tm& tm); @@ -1504,7 +1501,7 @@ public: explicit ExpressionIsoDayOfWeek(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIsoDayOfWeek, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const tm& tm); @@ -1516,7 +1513,7 @@ public: explicit ExpressionIsoWeek(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionIsoWeek, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; static int extract(const tm& tm); @@ -1528,7 +1525,7 @@ public: explicit ExpressionYear(const boost::intrusive_ptr<ExpressionContext>& expCtx) : ExpressionFixedArity<ExpressionYear, 1>(expCtx) {} - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; const char* getOpName() const final; // tm_year is years since 1990 @@ -1544,7 +1541,7 @@ public: : Expression(expCtx) {} void addDependencies(DepsTracker* deps) const final; - Value evaluateInternal(Variables* vars) const final; + Value evaluateInternal() const final; boost::intrusive_ptr<Expression> optimize() final; static boost::intrusive_ptr<Expression> parse( const boost::intrusive_ptr<ExpressionContext>& expCtx, |