-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: django
-
None
-
🔵 Done
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
- We recently released the QueryOptimizer, which converts $expr binary operators to their direct $match equivalents. However, there exists subtle differences between $expr binary operators and $match binary operators. Handling of null values (e.g. {"field": null} vs {"$expr": { "$eq" : ["field", null]}}) differ because in find() operations null can also mean the "lack of a fields existence" whereas in $expr it means the field must also exist.
- As a consequence, to convert from express binary operator to a match operator, we need to include `$exists: False` in our operations.
Acceptance Criteria
- Have our optimizer code convert $expr on null matches to include $exists: false to ensure the query logic remains the same
Pitfalls
- Will require creating/rewriting test cases