Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Won't Fix
-
None
-
None
-
Not Needed
Description
From the shell, if I execute the following:
db.aggtype.drop();
|
db.aggtype.insert({key: NumberInt(24), value: 7});
|
db.aggtype.insert({key: NumberLong(24), value: 8});
|
db.aggtype.insert({key: 24, value: 5});
|
and then display the results with a find(), the first document loses its type wrapper:
> db.aggtype.find();
|
{ "_id" : ObjectId("4f569b9a48b5a0bc7ec5828c"), "key" : 24, "value" : 7 }
|
{ "_id" : ObjectId("4f569b9a48b5a0bc7ec5828d"), "key" : NumberLong(24), "value"
|
: 8 }
|
{ "_id" : ObjectId("4f569b9a48b5a0bc7ec5828e"), "key" : 24, "value" : 5 }
|
This is deceptive. I know from SERVER-5209 that it is stored as an int, but it looks like a JavaScript double precision float, like the last one.
Attachments
Issue Links
- duplicates
-
MONGOSH-602 Numeric values are stored as Int32 instead of Double
-
- Closed
-
- is duplicated by
-
SERVER-22489 Copy-paste A to B in shell; A != B
-
- Closed
-
- is related to
-
DOCS-6886 Extended JSON docs do not match BSON spec
-
- Open
-
- related to
-
SERVER-5424 Shell doesn't re-save retrieved integers in an array as integers (converted to 64-bit float)
-
- Backlog
-