Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97118

Migrate evaluate() for math expressions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-11-25, QE 2024-12-09, QE 2024-12-23, QE 2025-01-06, QE 2025-01-20
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Create a new header src/mongo/db/exec/expression/evaluate.h and define a namespace mongo::exec::expression with a set of functions

      Value evaluate(const ExpressionAdd& expr, const Document& root, Variables* variables)

      one for each

      • ExpressionAdd
      • ExpressionConstant
      • ExpressionDivide
      • ExpressionMod
      • ExpressionMultiply
      • ExpressionLog
      • ExpressionPow
      • ExpressionRandom
      • ExpressionRange
      • ExpressionSubtract
      • ExpressionRound
      • ExpressionTrunc
      • ExpressionIsNumber
      • ExpressionConvert
      • ExpressionAbs
      • ExpressionCeil
      • ExpressionExp
      • ExpressionFloor
      • ExpressionLn
      • ExpressionLog10
      • ExpressionSqrt
      • ExpressionBitNot
      • ExpressionArcTangent2
      • ExpressionDegreesToRadians
      • ExpressionRadiansToDegrees
      • ExpressionCosine
      • ExpressionSine
      • ExpressionTangent
      • ExpressionArcCosine
      • ExpressionArcSine
      • ExpressionHyperbolicArcTangent
      • ExpressionHyperbolicArcCosine
      • ExpressionArcTangent
      • ExpressionHyperbolicArcSine
      • ExpressionHyperbolicCosine
      • ExpressionHyperbolicSine
      • ExpressionHyperbolicTangent

      The body of the functions will be in a src/mongo/db/exec/expression/evaluate_math.cpp and will be taken from the evaluate() method, and the evaluate() method will be changed so that it calls the new method.

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: