-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QE 2022-04-04, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21
Both, the localField and foreignField, can be paths and we need to generate correct traversal sub-trees for them.
Notes:
1. paths with numbers, such as "a.0.b" aren't lowered for find queries so we should not lower $lookup stages that use them either
2. the path traversal logic in the classic engine can be found here: https://github.com/10gen/mongo/blob/3a0132fcb97a7559b9bfdb0021b25e30f873acb1/src/mongo/db/pipeline/document_source_lookup.cpp#L832-L837. We should strive to replicate it unless we explicitly decide not to (which should be then documented by separate tickets)
- is related to
-
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-64060 $lookup doesn't match an array with object that misses the local key to null
- Closed