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

Fix _id group bug with dataset that has missing value or null value for _id fieldpath

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Hide

      coll.insert([\{a: null}, \{b: 1}]);
       
      db.adminCommand(\{setParameter: 1, internalQueryEnableSlotBasedExecutionEngine: true});
       
      coll.aggregate([\{$group: {_id: "$a"}}]);
      { "_id" : null }
      { "_id" : null }
      

      Show
      coll.insert([\{a: null }, \{b: 1 }]);   db.adminCommand(\{setParameter: 1 , internalQueryEnableSlotBasedExecutionEngine: true });   coll.aggregate([\{$group: {_id: "$a" }}]); { "_id" : null } { "_id" : null }
    • QE 2021-10-04

    Description

      SBE $group returns two _id: null s for both missing value and null value for _id field path. They should be considered as a same group and return one _id: null.

       

      Attachments

        Activity

          People

            yoonsoo.kim@mongodb.com Yoon Soo Kim
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: