-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
Affects Version/s: 1.45.0
-
Component/s: None
-
None
-
Environment:OS: MacOS 14.7.2
node.js version: 20.18.0
Additional info: Compass Version 1.45.0 (1.45.0)
-
Not Needed
-
Developer Tools
Problem Statement/Rationale
What is going wrong? What action would you like the Engineering team to take?
- With the below filter entered manually to query a collection :
{ value: NumberLong(3359178440913756652) }
The result returned is incorrect: NumberLong('3359178440913756672')
- This is also visible when trying to export the result of the query, the input is wrongly converted to another number:
db.getCollection('testing').find({ value: NumberLong('3359178440913756672') });
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
- use the below test documents:
{ "_id": 1, "value": { "$numberLong": "3359178440913756672" } }, { "_id": 2, "value": { "$numberLong": "3359178440913756652" } }
- query with the below filter:
{ value: NumberLong(3359178440913756652) }
Expected Results
What do you expect to happen?
Returns:
{ "_id": 2, "value": { "$numberLong": "3359178440913756652" } }
Actual Results
What do you observe is happening?
Returns:
{ "_id": 1, "value": { "$numberLong": "3359178440913756672" } }