[COMPASS-4884] Exporting collections with int64 results in wrong (rounded) values Created: 17/Jun/21  Updated: 29/Oct/23  Resolved: 18/Jul/23

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: 1.26.1
Fix Version/s: 1.37.0

Type: Bug Priority: Critical - P2
Reporter: Wilson Cheong Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:
node.js / npm versions:
Additional info:


Issue Links:
Problem/Incident
is caused by NODE-3391 EJSON.stringify does not stringify Lo... Backlog
Related
related to COMPASS-6372 $limit (aggregation) value has unexpe... Open
Story Points: 1
Documentation Changes: Not Needed

 Description   

Description

When I export (either JSON or CSV) my int64 data using COMPASS, my resulting file has all the values rounded up when there are 18+ digits.  For example 8300000000000000321 becomes 8300000000000000000. 

Steps to Reproduce

Create a doc in a collection using int64 with a value of 8300000000000000321.  Then export that data either JSON or CSV using compass.

Expected Results

The data should not be changed (or rounded in any way).

Actual Results

Data is rounded (or modified).

Additional Notes

Any additional information that may be useful to include.



 Comments   
Comment by Le Roux Bodenstein [ 18/Jul/23 ]

The new import/export should fix this. When exporting to CSV it should just work, when exporting to JSON there are three options with different compatibility vs correctness tradeoffs. If not, please let us know.

Comment by Dan Dickout [ 06/May/22 ]

I have noticed this same issue. The number of digits rounded to 0 also seems random. In exporting the same collection multiple times to .csv format the time stamp ticks in my records stored as long sometimes will round 3 or 4 zeros but one version rounded 12 digits of 0s

637872844174317000

637873000000000000

Generated at Wed Feb 07 22:37:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.