Translation of the groupBy expression of a sugared $group is unimplemented

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • Hide

      A minimal repro for $bucket:

      > db.t.insert({a: 1, b: 2})
      > db.t.aggregate([{$bucket: {"groupBy": {$and: ["$a", 2]}, boundaries: [0, 1], default: 1}}])
      

      Notice that $bucket without an $and for the groupBy does not produce the error and group can be pushed down and executes correctly,

      db.t.aggregate([{$bucket: {"groupBy": "$a", boundaries: [false, true], default: 1}}])
      

      A minimal repro for $sortByCount:

      > db.t.aggregate([{$sortByCount: {$and: ["$a", 1]}}])
      
      Show
      A minimal repro for $bucket: > db.t.insert({a: 1, b: 2}) > db.t.aggregate([{$bucket: {"groupBy": {$and: ["$a", 2]}, boundaries: [0, 1], default: 1}}]) Notice that $bucket without an $and for the groupBy does not produce the error and group can be pushed down and executes correctly, db.t.aggregate([{$bucket: {"groupBy": "$a", boundaries: [false, true], default: 1}}]) A minimal repro for $sortByCount: > db.t.aggregate([{$sortByCount: {$and: ["$a", 1]}}])
    • QE 2021-10-04
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

            Assignee:
            Yoon Soo Kim (Inactive)
            Reporter:
            Eric Cox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: