Migrate evaluate() for Date-based expressions

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: 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
    • 200
    • None
    • 3
    • None
    • 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 ExpressionDateFromParts& expr, const Document& root, Variables* variables)

      one for each

      • ExpressionDateFromParts
      • ExpressionDateFromString
      • ExpressionDateToParts
      • ExpressionDateToString
      • ExpressionDateDiff
      • ExpressionDateAdd
      • ExpressionDateSubtract
      • ExpressionDateTrunc
      • ExpressionTsSecond
      • ExpressionTsIncrement
      • ExpressionDayOfMonth
      • ExpressionDayOfWeek
      • ExpressionDayOfYear
      • ExpressionHour
      • ExpressionMillisecond
      • ExpressionMinute
      • ExpressionMonth
      • ExpressionSecond
      • ExpressionWeek
      • ExpressionIsoWeekYear
      • ExpressionIsoDayOfWeek
      • ExpressionIsoWeek
      • ExpressionYear

      The body of the functions will be in a src/mongo/db/exec/expression/evaluate_date.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
            Reporter:
            Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: