-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.