-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QO 2022-10-03, QE 2022-10-17
This is an extension and continuation of SERVER-66846. The previous approach used a projection_executor, which we do not want to use in translating $project queries. SERVER-66846 only covers translating simple inclusion and exclusion projections from ProjectionAST.
This ticket was originally intended to change all the projection translation code to use the ProjectionAST. However, while implementing that, we discovered that ProjectionAST has no way to represent $addFields and $replaceRoot projections, which already had test-only support in CQF via the ProjectionExecutor codepath. While ideally we use parse trees as input to ABT translation instead of runtime data structures, in this case we chose to be more pragmatic and exercise more of the optimizer's code sooner. In the future, the current ABT translation will be replaced with a proper BSON > CST {} > ABT translation; hence, we don't get much value out of moving to the ProjectionAST right now. As a result, we chose to repurpose this ticket to undo the changes in SERVER-66846 (with updates, as the revert is not clean).
- is depended on by
-
SERVER-69231 Complete TODO listed in SERVER-68690
- Closed
- is related to
-
SERVER-70582 [CQF] Sampling CE may cause a MONGO_UNREACHABLE to be reached / segfault in traverseF
- Closed