-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
ALL
db.l.find() { "_id" : 1, "a" : { "no_x" : 1 } } { "_id" : 2, "a" : [ { "no_x" : 1 }, { "no_x" : 2 } ] } { "_id" : 3, "a" : [ { "x" : 1 }, { "no_x" : 2 } ] } { "_id" : 4, "a" : [ { "x" : 1 }, { "x" : null } ] } db.r.find() { "_id" : 0, "b" : null } db.l.find({"a.x":null}) { "_id" : 1, "a" : { "no_x" : 1 } } { "_id" : 2, "a" : [ { "no_x" : 1 }, { "no_x" : 2 } ] } { "_id" : 3, "a" : [ { "x" : 1 }, { "no_x" : 2 } ] } { "_id" : 4, "a" : [ { "x" : 1 }, { "x" : null } ] } // All four records match to 'null'. db.l.aggregate({$lookup: {from:"r", localField:"a.x", foreignField:"b", as:"matched"}}) { "_id" : 1, "a" : { "no_x" : 1 }, "matched" : [ { "_id" : 0, "b" : null } ] } { "_id" : 2, "a" : [ { "no_x" : 1 }, { "no_x" : 2 } ], "matched" : [ { "_id" : 0, "b" : null } ] } { "_id" : 3, "a" : [ { "x" : 1 }, { "no_x" : 2 } ], "matched" : [ ] } // didn't match to 'null' { "_id" : 4, "a" : [ { "x" : 1 }, { "x" : null } ], "matched" : [ { "_id" : 0, "b" : null } ] }
- is related to
-
SERVER-63690 Implement path handling of localField when lowering $lookup to SBE
- Closed
- related to
-
SERVER-63368 $lookup matches empty arrays to null/missing/undefined
- Closed