-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
QO 2024-01-08
Split out from SERVER-79367 since they could be more generally useful. See that ticket for a summary of the original motivation.
Current approach is to do rudimentary type detection, and apply simplifications when we know the output types:
- isObject(<known type>) -> true/false (can do similar for isArray/exists)
- setField(<const object/var -> const object>, "field", <value>) -> newObj(<fields from const obj>, "field", value)
- setField(newObj(...), "field", <value>) -> newObj(..., "field", <value>)
- related to
-
SERVER-79367 Optimize projections in Bonsai
- Closed