-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Query Optimization
-
Query 2019-06-17
For example, a user might store the arguments to an n-ary expression like $concatArrays inside a document in the collection:
db.c.insert({arraysToConcat: [[1, 2, 3], [4, 5, 6]]});
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. SERVER-31786 has a more detailed discussion of the use case.
Original description
The $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 SERVER-31786 for more details.
- is duplicated by
-
SERVER-27964 $zip should accept array of arrays expression
- Closed
-
SERVER-40494 Aggregation Framework does not have referential transparency for function calls
- Closed
- is related to
-
SERVER-10681 $multiply operator cannot processed a referenced array field
- Closed
-
SERVER-16281 $setUnion does not descend into nested arrays
- Closed
-
SERVER-10626 Support numeric arrays as input to $add in aggregation's $project
- Closed
-
SERVER-42020 Add SumOfProduct and ProductOfSum accumulators
- Closed
-
SERVER-30547 $dateFromParts should accept an object from another expression
- Open
-
SERVER-10676 $multiply does not support a reference to an array
- Closed
-
SERVER-27964 $zip should accept array of arrays expression
- Closed
- related to
-
SERVER-31786 $concatArrays not working on existing multi array field
- Closed
-
SERVER-31831 Improve aggregation set operations for array of objects
- Backlog