-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Write a PBT which generates arbitrary predicates, documents and indexes. Then runs find(pred) and find(Not(pred)) and verifies the following properties:
- find(pred) and find(Not(pred)) should be disjoint sets
- The union of the two sets should contain the entire collection
Because MQL does not have a top-level $not operator, we can achieve the desired behavior by using a top-level $nor with a single child.
The alternative (or in addition) approach could be to restrict this to generate $not for children of path match expression. For example, {foo: pred} and {foo: {$not: pred}}. In this case, we'd need to be careful that we are only generate a single top-level predicate.
- is related to
-
SERVER-55642 Parsing {$ne: X} to {$not: {$eq: X}} is weird with arrays
-
- Backlog
-