-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2022-04-04
For SERVER-63690 I'm implementing the basic path handling that does not match the current semantics of the classic engine (see SERVER-64060).
The problem here is to distinguish between the set of key values that was empty due to a path that didn't traverse any arrays but resulted in missing (in classical it matches to null), vs a path that traversed arrays and all terminals were missing (in classical it matches to null because an empty array matches to null), vs a path that traverses arrays and some terminals are missing and others aren't (in classical this does not match to null), vs all terminals being empty arrays (per SERVER-63368 classical will produce no matches in this case)
In SBE it's easy to implement either:
1. Treat any missing terminal as null and match records with such terminals to null/missing (this will match to null when some of the terminals are missing but not all)
2. For empty set of key values (because neither of the terminals produced a non-missing value) produce no matches (this won't match to null a path with no arrays that terminates in missing)
3. Match empty set of key values (because neither of the terminals produced a non-missing value) to null (this will match to null empty arrays).
- depends on
-
SERVER-64483 Implement path handling of foreignField when lowering $lookup to NLJ in SBE
- Closed
- related to
-
SERVER-63368 $lookup matches empty arrays to null/missing/undefined
- Closed
-
SERVER-64006 $lookup matches on paths through arrays differently for local/foreign collections
- Closed