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

Importing $numberDouble json with a number that's an integer makes it int32

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.41.0
    • Affects Version/s: 1.40.4
    • Component/s: Import/Export
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • 2
    • Not Needed

      Example doc to import (json file with this attached):
      ```
      [{
        "doubleNum":

      {     "$numberDouble": "-45"   }

      }]
      ```

      Results in Int32 type:

      Probably needs a `promoteValues: false` in the ejson deserialize: https://github.com/mongodb-js/compass/blob/50b2b2966e1eae0c92a60877f40a5e94624cec14/packages/compass-import-export/src/import/import-json.ts#L81 
      Let's also add a regression test.

        1. doubleNum.json
          0.1 kB
          Rhys Howell
        2. Screenshot 2023-11-08 at 3.00.56 PM.png
          29 kB
          Rhys Howell

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: