-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Apparently we don't do constant folding for the map/reduce/filter operators (see for example the implementation of map). Solving this would increase the consistency and performance of MQL. Also, since SBE does a constant folding pass with the classical engine, these are also gains for queries that execute using SBE.
When this is implemented, make sure to add queries eligible for constant folding in map.js, filter.js and reduce.js under jstests.