Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99112

Investigate numberDecimal vs numberDouble diff failures

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Query Optimization
    • QO 2025-01-20

      https://docs.google.com/spreadsheets/d/1-eStlJTgMs6Fx-_CL2RELT5CY7aoTeix_3-IlaEgOzo/edit?gid=0#gid=0&range=A11

      Query:

      [
          {
              "$sort": {
                  "_id": 1
              }
          },
          {
              "$group": {
                  "_id": "$obj.any",
                  "num": {
                      "$max": {
                          "$multiply": [
                              {
                                  "$dayOfYear": {
                                      "date": ISODate("2019-12-17T19:49:02.641Z"),
                                      "timezone": "Asia/Urumqi"
                                  }
                              },
                              "$num",
                              "$obj.num",
                              68526
                          ]
                      }
                  }
              }
          }
      ]
      
      

      We're seeing a differing result between v7.0 with optimizations off and master with optimizations on.

      The former returns

      {_id: null, num: {$numberDecimal: Infinity}}
      

      While the latter returns

      {_id: null, num: {$numberDouble: Infinity}}
      

            Assignee:
            lynne.wang@mongodb.com Lynne Wang
            Reporter:
            william.qian@mongodb.com William Qian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: