Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11718

Allow aggregation framework to optionally pass through non-arrays through $unwind

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.5.3
    • None
    • Aggregation Framework
    • None

    Description

      Apparently there are cases where fields can be single values or they can be arrays of values.

      There's cases where you want to normalize it and since there is no way to turn a single element into array of one in aggregation (if there was that would help this use case) then maybe there can be a way to call $unwind on arrays without non-array documents causing an error "Value at end of $unwind field path '$a' must be an Array".

      To not change current behavior maybe it can be an optional parameter to $unwind $ignoreNonArrays:true or something like that.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asya.kamsky@mongodb.com Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: