SERVER-134187In Code Review
Arrayness of dotted path after inclusion projection is incorrect
The dependency graph reports prefix of $project path as non-array after the $project stage. This affects the following simple cases: The prefix "a" is reported as non-array AFTER the $project. This is wrong: an inclusion projection applies the computed field element-wise: {a: [{}, {}]} becomes {a: [ {b: 1} , \{b: 1}]} and a is still an array. This was discovered using the PBT test from SERVER-134177 which is not merged yet. *Consequence* Only the MATCH_PUSHDOWN optimizat