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

Make GroupStage and AddFieldsStage Weight Fair

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution

      Half of the generated GroupStage is

       [{$group: {_id: null}}]

      this is because the grammar rule is

       IdExpression -> "_id: " Expression | "_id: null"

      it makes Expression and null case equally weighted, and causing a lot of null cases are duplicated.

      Similar to AddFieldsStage:

      AddFieldsStage -> "{$addFields: {" AddFieldsList "}}"
      AddFieldsStage -> "{$addFields: {}}" 

            Assignee:
            Unassigned Unassigned
            Reporter:
            zixuan.zhuang@mongodb.com Zixuan Zhuang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: