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

Infinity numbers are exported as null values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 1.31.1, 1.32.4
    • 1.32.6
    • Import/Export
    • None
    • 2
    • Not Needed
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: