[SERVER-75149] Simplify BSON produced by $lookup for foreign field local field join Created: 22/Mar/23  Updated: 29/Oct/23  Resolved: 24/Mar/23

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

Type: Improvement Priority: Major - P3
Reporter: Matt Boros Assignee: Matt Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-04-03
Participants:

 Description   

$lookup wraps its $match join in an $and when there is potentially one predicate, with potentially empty predicates included. Since we re-optimize and canonicalize the pipeline for every outer document, it's best for us to produce simpler BSON if possible in $lookup.



 Comments   
Comment by Githook User [ 23/Mar/23 ]

Author:

{'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com', 'username': 'mattBoros'}

Message: SERVER-75149 Simplify BSON produced by $lookup for foreign field local field join
Branch: master
https://github.com/mongodb/mongo/commit/e8a9c46c94cd34e8eae483d2967a756f38f0aa84

Generated at Thu Feb 08 06:29:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.