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

Shouldn't {$sum:1} inside a $group aggregation step give a "long" not "double" ?

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.0.11
    • Component/s: Aggregation Framework
    • Labels:
      None

      In this step:

           {
              "$group": {
                "_id": {"tLc": "$indices", lc: "$lc", group: "$group"},
                "f": {"$sum": 1}
              }
            },
      

      the field "f" is output as a Double, but since it's summing an integer, wouldn't a Long be more appropriate. Is there any way to cast inside the AF?

            Assignee:
            Unassigned Unassigned
            Reporter:
            niccottrell Nic Cottrell (Personal)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: