-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
Half of the generated GroupStage is
[{$group: {_id: null}}]
this is because the grammar rule is
IdExpression -> "_id: " Expression | "_id: null"
it makes Expression and null case equally weighted, and causing a lot of null cases are duplicated.
Similar to AddFieldsStage:
AddFieldsStage -> "{$addFields: {" AddFieldsList "}}" AddFieldsStage -> "{$addFields: {}}"