Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
Minor Change
-
ALL
-
Query 2019-09-23, Query 2019-10-07
Description
> db.foo.find()
|
{ "_id" : 2 }
|
{ "_id" : 1, "x" : null }
|
{ "_id" : 3, "y" : null }
|
{ "_id" : 4, "x" : null, "y" : null }
|
> db.foo.aggregate([{$group: {_id: ["$x", "$y"]}}])
|
{ "_id" : [ "$x", "$y" ] }
|
> db.foo.aggregate([{$group: {_id: {z: ["$x", "$y"]}}}])
|
{ "_id" : { "z" : [ null, null ] } }
|
I would contend that the middle one should result in
{_id: [null, null]}
|
Looks like this is the offending line.