[COMPASS-5974] Infinity numbers are exported as null values Created: 25/Jul/22  Updated: 29/Oct/23  Resolved: 26/Jul/22

Status: Closed
Project: Compass
Component/s: Import/Export
Affects Version/s: 1.31.1, 1.32.4
Fix Version/s: 1.32.6

Type: Bug Priority: Major - P3
Reporter: Kai Orend Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 2
Documentation Changes: Not Needed
Sprint: Iteration Grouper

 Description   

Problem Statement/Rationale

Compass exports Infinity values as null values.

Steps to Reproduce

Create a document in an empty collection which contains an Infinity value and then export the collection with Compass in JSON format, for instance:

db.test.insertOne({some_field: Infinity})

Expected Results

The exported JSON file should either contain  

{some_field: Infinity} 

or

{
    some_field: { '$numberDouble': 'Infinity' }
 } 

Actual Results

Compass export Infinity values as null values, so the result would like:

{     some_field:  null   }  

Additional Notes

This was observed with Compass 1.32.4. and 1.31.1.  Version 1.29.4 does not seem to contain this bug.



 Comments   
Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 30/Aug/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: compass-settings
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 29/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: remove-rc-from-evergreen
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 27/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: macos-arm-build
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: COMPASS-5678-query-history-as-popover
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: COMPASS-5672-update-crud-toolbar-to-lg
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: remote
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974 (#3286)

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: main
https://github.com/mongodb-js/compass/commit/3ef3602931b27fe3f4168225d0a9552761cdfc2b

Comment by Githook User [ 25/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: 5974-dev
https://github.com/mongodb-js/compass/commit/0ac97eacbfc89699b85f004ac51d34360cd900d5

Comment by Githook User [ 25/Jul/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: fix(hadron-document): handle oddball fp numbers well in `.toEJSON()` COMPASS-5974

Bug introduced by yours truly in 47e5bfae7ee7b.
Branch: 5974-dev
https://github.com/mongodb-js/compass/commit/5700f1ef233d1b816278dace6e79bc1a7f346381

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