[SERVER-82109] Refactor ExpressionContext to use designated initializers Created: 12/Oct/23 Updated: 30/Jan/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Denis Grebennicov | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Participants: | |||||||||
| Description |
|
Currently ExpressionContext has multiple constructors that has multiple default values in their arguments. Multiple commands like find and distinct create the ExpressionContext from the existing constructors and pass multiple attributes that should have been default values Proposal is to use designated initilizer when constructing ExpressionContext and if constructors are necessary, then we could create a aggregate config struct and use it as the constructor parameter. The example usage would be like this:
|