SERVER-137999ClosedFixed

Join optimization NLJ with a sub-pipeline-projected foreign node as the outer side hits tassert

Plan HJ(NLJ(PROJECTION_DEFAULT(COLLSCAN b), COLLSCAN a), COLLSCAN c) where b's sub-pipeline $project renames the field the second join reads (b.y). The NLJ stage builder in gen_lookup.cpp does not export the renamed slot from the outer side, and the plan fails at prepare time.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
found-by-ai