[SERVER-34927] allow localField and foreignField with more expressive $lookup pipeline Created: 10/May/18  Updated: 29/Oct/23  Resolved: 08/Jan/21

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Hana Pearlman
Resolution: Fixed Votes: 0
Labels: asya, qopt-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-14111 Investigate changes in SERVER-34927: ... Closed
Problem/Incident
Related
related to SERVER-49953 allow $expr as RHS expression in regu... Closed
related to SERVER-45326 Poor Aggregation Framework performanc... Closed
is related to SERVER-29376 Rewrite $lookup localField/foreignFie... Closed
is related to SERVER-40362 expressive $lookup "let" with missing... Backlog
is related to SERVER-41171 MongoDB $lookup using "$expr" is slow... Backlog
Backwards Compatibility: Fully Compatible
Sprint: Query 2020-12-14, Query 2020-12-28, Query 2021-01-11
Participants:
Case:

 Description   

This proposes closing SERVER-29376 and instead allowing combination of both, localField and foreignField and expressive pipeline.

{$lookup:{from:"other",
                localField:"l",
                foreignField:"f",
                as:"fromOther"
                [, pipeline: [ ... ] ]  /* optionally add a pipeline to apply *after* equality join */

This allows preserving the non-expressive lookup equality semantics with additional flexibility of using anything along with it like $sort and $limit etc.



 Comments   
Comment by Ian Whalen (Inactive) [ 09/Jan/21 ]

Author:

{'username': u'evrg-bot-webhook', 'name': u'Hana Pearlman', 'email': u'hana.pearlman@mongodb.com'}

Message:SERVER-34927: allow localField and foreignField with more expressive $lookup pipeline
Branch:master
https://github.com/mongodb/mongo/commit/3fadec4ccd5abc2b29ebdba1a269766eb2a4e256

Generated at Thu Feb 08 04:38:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.