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

Add SBE builder for $group accumulators

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • Query Execution 2021-07-12, Query Execution 2021-07-26

    Description

      Unlike agg expressions, which are transformed from Expression* to an SBE PlanStage tree, $group accumulators will need to transformed from from an AccumulationStatement (or related type) into two sets of SBE expressions: one set for "accumulation" and another for "finalization."

      For example, $avg will be implemented with two accumulators: one for summing all of the elements and another for counting. The "finalization" expression will divide the sum by the count.

      $push on the other hand will be implemented with just an accumulator, which pushes to an array (there is no need for "finalizing").

       

      Attachments

        Issue Links

          Activity

            People

              eric.cox@mongodb.com Eric Cox (Inactive)
              ian.boros@mongodb.com Ian Boros
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: