Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-974

Document new aggregation $min behavior in 2.4 of skipping null and undefined values

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • mongodb-2.4
    • None
    • manual
    • None

    Description

      This is in relation to issues SERVER-6471.

      The old behavior was that aggregation with the $min operator would consider a) values set to null and b) undefined values. Case a) would return the null value as the minimum. Case b) would prefer the "undefined" value as the minimum and thus undefine the value in the end result.

      The new behavior is to skip both undefined and null values when comparing and therefore not considering them as being smaller than any of the "real" values.

      The documentation on the aggregation $min operator is very short and doesn't mention any behavior in regard to null or undefined values. It needs to be updated and fleshed out for 2.4.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 48 weeks, 4 days ago