Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3716

Investigate changes in SERVER-16284: Allow for $pushall / $push with $each to allow pushing all elements of array in $group

    • Type: Icon: Investigation Investigation
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator

      Original Downstream Change Summary

      This ticket represents the work done to add new accumulators $concatArrays and $setUnion. The accumulators (like the other accumulators) can be used in $group, $bucketAuto, $bucket, and $setWindowFields. Both accumulators can be used with the classic execution engine and with SBE (we would only use SBE if the operator that uses the accumulators is enabled in SBE). See the linked syntax doc for further details on semantics.

      Description of Linked Ticket

      I would like to be able to push all elements of an array field into a new field. So, in a $group, I could do a $push or $addToSet of a field that is an array field and the resulting field would be an array of the elements instead of an array of arrays.

      Seems like the $each operator in update is the solution if added to aggregations.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: