Add $isNull aggregation expression

XMLWordPrintableJSON

    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Matt Kalan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: