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

Add $isNull aggregation expression

    XMLWordPrintableJSON

Details

    • Query Optimization

    Description

      We should add an $isNull aggregation expression, that returns true for missing, null, or undefined values.

      Original Description

      I have documents that sometimes have an array field called purchases and sometimes not and it fails when $size hits a document without the purchases field. I don't see how to check if it is an array before running it. $exists does not seem to work within $project nor $type to check if it is an array type. The easiest would be if $size just doesn't fail and returns null.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            matt.kalan@mongodb.com Matt Kalan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: