-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
STRICT_DISTINCT_ONLY means that the following are true (see this comment):
1. exactly one document per distinct value
2. no array unwinding
3. include missing fields in the result
None of the above are true for distinct() (it doesn't set STRICT_DISTINCT_ONLY). For $group without unwind, all of the above are true (it sets STRICT_DISTINCT_ONLY but not unwindsArrays). For $unwind+$group (ever since SERVER-37715), 1 and 3 are true (it sets STRICT_DISTINCT_ONLY and unwindsArrays).
We should either split STRICT_DISTINCT_ONLY into three separate settings (one for each promise enumerated above), or replace it with an enum that represents the three different DISTINCT_SCAN configurations described above.
- is related to
-
SERVER-37715 Use DISTINCT_SCAN for $unwind-$group pipelines
-
- Open
-