Add SBE builder for $group accumulators

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Query Execution 2021-07-12, Query Execution 2021-07-26
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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").

       

              Assignee:
              Eric Cox (Inactive)
              Reporter:
              Ian Boros
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: