SERVER-139446Needs Scheduling

Absorb relevant $project/$addFields fields into $lookup

We could do the following rewrite: + similar with renames and dotted paths where possible. We already have a similar rewrite on $match, to absorb the $match into the $lookup subpipeline. This $project rewrite will reduce the size of the returned data which has a positive performance impact, but also enable other optimisations, such as the projection pushdown, $match pushdown (including with computed fields), etc. A simple local test showed potential for 35% improvement when the forei

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.