use std::fmt::Debug;
use vortex_error::VortexResult;
use crate::ArrayRef;
use crate::ExecutionCtx;
use crate::aggregate_fn::AggregateFnRef;
use crate::arrays::FixedSizeListArray;
use crate::arrays::ListViewArray;
use crate::scalar::Scalar;
pub trait DynAggregateKernel: 'static + Send + Sync + Debug {
fn aggregate(
&self,
aggregate_fn: &AggregateFnRef,
batch: &ArrayRef,
ctx: &mut ExecutionCtx,
) -> VortexResult<Option<Scalar>>;
}
pub trait DynGroupedAggregateKernel: 'static + Send + Sync + Debug {
fn grouped_aggregate(
&self,
aggregate_fn: &AggregateFnRef,
groups: &ListViewArray,
) -> VortexResult<Option<ArrayRef>>;
fn grouped_aggregate_fixed_size(
&self,
aggregate_fn: &AggregateFnRef,
groups: &FixedSizeListArray,
) -> VortexResult<Option<ArrayRef>> {
let _ = (aggregate_fn, groups);
Ok(None)
}
}