[SERVER-41418] De-couple 'Variables' from agg 'ExpressionContext' Created: 31/May/19 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
This is a follow up ticket to As part of this ticket we can also make ExpressionContext const through out the expression tree. 'ExpressionContext' is not being modified anymore and this change should be straight forward. |
| Comments |
| Comment by Charlie Swanson [ 04/Jun/19 ] |
|
As part of this, the interface for 'optimize()' will probably be affected as well. Some optimizations like constant folding need to evaluate the sub-arguments. For example, {$add: [2, 3]} will optimize to just 5. In doing so it will need to call 'evaluate' and so will need some variables. |