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

Use EvalExpr in more places in sbe_stage_builder_expression.cpp

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query Execution 2021-07-26, QE 2021-08-09

      During the code review for SERVER-58569, it was noted that "sbe_stage_builder_expression.cpp" was generating some unnecessary ProjectStages.

      By using EvalExpr in more places in "sbe_stage_builder_expression.cpp", we can eliminate these unnecessary ProjectStages. (The 'evalStack' in "sbe_stage_builder_expression.cpp" already uses EvalExpr, but many places in the code don't make use of EvalExpr's capabilities and just call extractExpr() to pull out the EExpression.)

      The goal of this task is to change generateExpression() to return an EvalExprStagePair, to update various places in "sbe_stage_builder_expression.cpp" and callers of generateExpression() to take advantage of EvalExpr's capabilities.

            Assignee:
            andrew.paroski@mongodb.com Drew Paroski
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: