Expand description
Wrapper for making aggregate functions out of state/merge functions of original aggregate functions.
i.e. for a aggregate function foo
, we will have a state function foo_state
and a merge function foo_merge
.
foo_state
’s input args is the same as foo
’s, and its output is a state object.
Note that foo_state
might have multiple output columns, so it’s a struct array
that each output column is a struct field.
foo_merge
’s input arg is the same as foo_state
’s output, and its output is the same as foo
’s input.
Structs§
- Merge
Accum - The merge accumulator, which modify
update_batch
’s behavior to accept one struct array which include the state fields of original aggregate function, and merge said states into original accumulator the output is the same as original aggregate function - Merge
Wrapper - TODO(discord9): mark this function as non-ser/de able
- State
Accum - The wrapper’s input is the same as the original aggregate function’s input, and the output is the state function’s output.
- State
Merge Helper - A wrapper to make an aggregate function out of the state and merge functions of the original aggregate function. It contains the original aggregate function, the state functions, and the merge function.
- State
Wrapper - Wrapper to make an aggregate function out of a state function.
- Step
Aggr Plan - A struct to hold the two aggregate plans, one for the state function(lower) and one for the merge function(upper).
Functions§
- aggr_
merge_ func_ name - Returns the name of the merge function for the given aggregate function name. The merge function is used to merge the states of the state functions. The merge function’s name is in the format `__<aggr_name>_merge
- aggr_
state_ func_ name - Returns the name of the state function for the given aggregate function name. The state function is used to compute the state of the aggregate function. The state function’s name is in the format `__<aggr_name>_state
- get_
aggr_ func