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

$avg should do integer summation with integer inputs

    • Query 2018-04-23

      > db.avgtest.drop()
      true
      > db.avgtest.insert({nums: [NumberLong("18014398509481984"), NumberLong(1), NumberLong("-18014398509481984"),NumberLong(-1)]})
      > db.avgtest.aggregate({$unwind:'$nums'}, {$group: {_id:1, avg:{$avg:'$nums'}}})
      { "result" : [ { "_id" : 1, "avg" : -0.25 } ], "ok" : 1 }
      

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: