-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.3
-
Component/s: Aggregation Framework
-
Query Optimization
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.
- is related to
-
SERVER-13903 inconsistent treatment of null in $project comparisons vs other stages
- Backlog