Aggregation results are different when performed in compass UI and mongosh

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS: Mac arm
      node.js / npm versions: 9.6.4
    • Not Needed
    • None

      Problem Statement/Rationale

      Compass aggregation with $group and $sum showing incorrect results.

      Steps to Reproduce

      Aggregation type:
      db.col.aggregate([\{$group: {_id: "$field1", count: {$sum:1}}}, \\\{$sort: {count: -1}}])

      Expected Results

      Results in compass and mongosh should be identical

      Actual Results

      See attached image.  Compass results are incorrect.

       

      Compass version: 1.39.1

            Assignee:
            Unassigned
            Reporter:
            Stas Baskin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: