SERVER-131449ClosedFixed

Dependency graph loses nested path arrayness after later $project of collection field

When the inclusion projection of a collection field is not at the first position in the pipeline, the field inclusion logic for nested paths can lose the path arrayness of collection fields. This will not lead to an incorrect rewrite, but it is an omission and can be improved. We lose arrayness for 'a.b' and 'a.b.c', just 'a' remains as known non-array. canPathBeArray(nullptr, "a.b") -> true when it should be false

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-rc1024
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
deps-trackingtech-debt