See steps to reproduce.
In the steps below we expected both aggregation pipelines return the same results. In server version before v6 it was working as expected. The problem seems to started with v6 (we tested 6.0.2 and 6.0.5 versions).
The difference between two aggregation pipelines is that in the first case we project using A : "$A" and in the second we project using A : 1. We expect them to be equivalent.
- is related to
-
CSHARP-4656 Simplify A : "$A" to A : 1 only on find
- Closed
- related to
-
SERVER-75267 Summing $bsonSize in $group stage with projected fields fails due to an invalid pushdown of $project
- Closed