Skip to main content

DynAggregatorFactory

Trait DynAggregatorFactory 

Source
pub trait DynAggregatorFactory: Send + Sync {
    // Required methods
    fn create_accumulator(&self) -> Box<dyn DynAccumulator>;
    fn result_field(&self) -> Field;
    fn clone_box(&self) -> Box<dyn DynAggregatorFactory>;
    fn type_tag(&self) -> &'static str;
}
Expand description

Factory trait for creating DynAccumulator instances.

Each factory corresponds to one aggregate function (e.g., SUM, COUNT). The CompositeAggregator holds multiple factories.

Required Methods§

Source

fn create_accumulator(&self) -> Box<dyn DynAccumulator>

Creates a new empty accumulator.

Source

fn result_field(&self) -> Field

Returns the Arrow field descriptor for results.

Source

fn clone_box(&self) -> Box<dyn DynAggregatorFactory>

Creates a boxed clone of this factory.

Source

fn type_tag(&self) -> &'static str

Returns a type tag for deserialization dispatch.

Implementors§