$type returns double for NumberDecimal("Infinity")

XMLWordPrintableJSON

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

      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
            Reporter:
            Lynne Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: