SERVER-21992Backlog
Inconsistent results when grouping by possibly missing values
My database contains the following documents: Note that the second document does not have a type field, it's missing. The aggregation pipeline produces inconsistent results sometimes showing 'type' :null in the id field, and sometimes not. For example, the following aggregation does NOT return the missing type in the key: Results in: However, this aggregation, returns back a 'type' : null, Results in: Note that the only difference was the comment out of the 'col