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

Add SBE builder for $group accumulators

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      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

              Assignee:
              eric.cox Eric Cox
              Reporter:
              ian.boros Ian Boros
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: