Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
AggregateState in datafusion_expr - Rust
[go: Go Back, main page]

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.

Implementations§

Access the aggregate state as a scalar value. An error will occur if the state is not a scalar value.

Access the aggregate state as an array value.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.