-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
Let create a test that focuses on dotted paths and array traversal. For example, given a predicate with a dotted path like {'a.b.c': {$eq: 2}}, there is a wide variety of input data that is interesting to test:
- 'a' might be missing, or a scalar
- 'a' might be an object, in which:
- 'b' might be missing, scalar, object, array ...
- 'a' might be an array, in which the elements are:
- scalars, objects, arrays ...
The path 'a.b.c' can pick out zero, one, or many values depending on where the arrays / scalars / missing fields are. So another thing we can vary is: how many leaves match the {$eq: 2} predicate? zero, one or many.