-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.1
-
Component/s: Aggregation Framework
-
Query Optimization
-
ALL
-
(copied to CRM)
If a field is missing (undefined), in project stage it is impossible to determine that by comparing it to null.
{$eq: ["$field", null] }
only returns true if 'field' is present and null.
This is inconsistent with many other places, including ifNull treating null and undefined the same, as well as group (_id null and undefined all go into one bucket).
If this is intentional then it should be documented.
Tiny bit related to this is SERVER-6199
- is duplicated by
-
SERVER-26180 is this a bug in $cond in $project, or am i using it wrong?
- Closed
-
SERVER-20166 Aggregation's $eq expression doesn't match query semantics when a field is missing
- Closed
- related to
-
SERVER-18759 Add $isNull aggregation expression
- Backlog