Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5974

Infinity numbers are exported as null values

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.32.6
    • Affects Version/s: 1.31.1, 1.32.4
    • Component/s: Import/Export
    • None
    • 2
    • Not Needed
    • Iteration Grouper

      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.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            kai.orend@mongodb.com Kai Orend
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: