[SERVER-4738] aggregation: field inclusion in $group _id is not accepting integral types Created: 20/Jan/12  Updated: 11/Jul/16  Resolved: 23/Jan/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Bug Priority: Major - P3
Reporter: Chris Westin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-447 new aggregation framework Closed
Operating System: ALL
Participants:

 Description   

This script causes an error:

db = db.getSiblingDB('foo');

var r = db.runCommand({ "aggregate" : "blah", "pipeline" : [
{ "$project" : {
"key" : 1,
"v" : 1
}},
{ "$group" : {
"_id" :

{ "key" : NumberInt(1) }

,
"min_v" :

{ "$min" : "$v" }

}}
]});

> r
{
"errmsg" : "exception: disallowed field type 16 in object expression (at
\"key\")",
"code" : 15992,
"ok" : 0
}

I tried using NumberInt for the ones in the $project, and they were fine. Just the one in the $group has the problem.



 Comments   
Comment by auto [ 23/Jan/12 ]

Author:

{u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}

Message: SERVER-4738 +
Branch: master
https://github.com/mongodb/mongo/commit/8ab00af5257a16ace7807842d3a4843e5a0dd64a

Generated at Thu Feb 08 03:06:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.