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

$type returns double for NumberDecimal("Infinity")

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • ALL

      Running this pipeline:

      db.coll.aggregate({$project: {_id: 0, num: {$max: [NumberDecimal("Infinity"), Infinity]}, numType: {$type: "$num"}}}
      

      returns

      { "num" : NumberDecimal("Infinity"), "numType" : "double" }
      

      This should be returning "decimal" as the type instead.

            Assignee:
            Unassigned Unassigned
            Reporter:
            lynne.wang@mongodb.com Lynne Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: