Skip to main content

DynGroupedAggregateKernel

Trait DynGroupedAggregateKernel 

Source
pub trait DynGroupedAggregateKernel:
    'static
    + Send
    + Sync
    + Debug {
    // Required method
    fn grouped_aggregate(
        &self,
        aggregate_fn: &AggregateFnRef,
        groups: &ListViewArray,
    ) -> VortexResult<Option<ArrayRef>>;

    // Provided method
    fn grouped_aggregate_fixed_size(
        &self,
        aggregate_fn: &AggregateFnRef,
        groups: &FixedSizeListArray,
    ) -> VortexResult<Option<ArrayRef>> { ... }
}
Expand description

A pluggable kernel for batch aggregation of many groups.

The kernel is matched on the encoding of the elements array, which is the inner array of the provided ListViewArray. This is more pragmatic than having every kernel match on the outer list encoding and having to deal with the possibility of multiple list encodings.

Each element of the list array represents a group and the result of the grouped aggregate should be an array of the same length, where each element is the aggregate state of the corresponding group.

Return Ok(None) if the kernel cannot be applied to the given aggregate function.

Required Methods§

Source

fn grouped_aggregate( &self, aggregate_fn: &AggregateFnRef, groups: &ListViewArray, ) -> VortexResult<Option<ArrayRef>>

Aggregate each group in the provided ListViewArray and return an array of the aggregate states.

Provided Methods§

Source

fn grouped_aggregate_fixed_size( &self, aggregate_fn: &AggregateFnRef, groups: &FixedSizeListArray, ) -> VortexResult<Option<ArrayRef>>

Aggregate each group in the provided FixedSizeListArray and return an array of the aggregate states.

Implementors§