Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7201

Aggregation results are different when performed in compass UI and mongosh

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

      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 Unassigned
            Reporter:
            stas.baskin@mongodb.com Stas Baskin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: