[SERVER-31991] Allow n-ary aggregation expressions to compute their array of arguments dynamically Created: 15/Nov/17 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Joel Goldfinger | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 5 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2019-06-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
For example, a user might store the arguments to an n-ary expression like $concatArrays inside a document in the collection:
There should be a way to use the the value of the field path expression "$arraysToConcat" as the list of arguments to $concatArrays. Neither the expressions {$concatArrays: "$arraysToConcat"} nor {$concatArrays: ["$arraysToConcat"]} have this meaning. Original descriptionThe $concatArrays operator does not handle using a multi array field already in the collection. The current work around is to use $reduce with $concatArrays. See |
| Comments |
| Comment by Asya Kamsky [ 30/May/19 ] |
|
Linking to a number of related tickets, all basically expecting to be able to use a stored array where aggregation is expecting an array of specified input values. |
| Comment by Mark Agarunov [ 15/Nov/17 ] |
|
Hello devnopt, Thank you for the report. I've set the fixVersion to "Needs Triage" for this new feature to be scheduled against our currently planned work. Updates will be posted on this ticket as they happen. Thanks, |