[SERVER-63690] Implement path handling of localField when lowering $lookup to SBE Created: 15/Feb/22  Updated: 29/Oct/23  Resolved: 21/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-63368 $lookup matches empty arrays to null/... Closed
related to SERVER-64060 $lookup doesn't match an array with o... Closed
is related to SERVER-64483 Implement path handling of foreignFie... Closed
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-04-04, QE 2022-02-21, QE 2022-03-07, QE 2022-03-21
Participants:

 Description   

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)



 Comments   
Comment by Githook User [ 18/Mar/22 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-63690 Support field paths in localField of lookup when lowering to SBE
Branch: master
https://github.com/mongodb/mongo/commit/ebb1f3900176b9df1f3c20646f349c9785914c43

Comment by Githook User [ 05/Mar/22 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-63690 Mark lookup stage as sbe-incompatible if local/foreign fields use paths with numerals
Branch: master
https://github.com/mongodb/mongo/commit/10ab59b4f648b88d25fa24eb62df34fc2179dbb9

Generated at Thu Feb 08 05:58:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.