Enum datafusion_expr::AggregateState
source · pub enum AggregateState {
Scalar(ScalarValue),
Array(ArrayRef),
}
Expand description
Representation of internal accumulator state. Accumulators can potentially have a mix of
scalar and array values. It may be desirable to add custom aggregator states here as well
in the future (perhaps Custom(Box<dyn Any>)
?).
Variants§
Scalar(ScalarValue)
Simple scalar value. Note that ScalarValue::List
can be used to pass multiple
values around
Array(ArrayRef)
Arrays can be used instead of ScalarValue::List
and could potentially have better
performance with large data sets, although this has not been verified. It also allows
for use of arrow kernels with less overhead.