Struct datafusion_expr::AggregateUDF
source · [−]pub struct AggregateUDF {
pub name: String,
pub signature: Signature,
pub return_type: ReturnTypeFunction,
pub accumulator: AccumulatorFunctionImplementation,
pub state_type: StateTypeFunction,
}
Expand description
Logical representation of a user-defined aggregate function (UDAF) A UDAF is different from a UDF in that it is stateful across batches.
Fields
name: String
name
signature: Signature
signature
return_type: ReturnTypeFunction
Return type
accumulator: AccumulatorFunctionImplementation
actual implementation
state_type: StateTypeFunction
the accumulator’s state’s description as a function of the return type
Implementations
sourceimpl AggregateUDF
impl AggregateUDF
sourcepub fn new(
name: &str,
signature: &Signature,
return_type: &ReturnTypeFunction,
accumulator: &AccumulatorFunctionImplementation,
state_type: &StateTypeFunction
) -> Self
pub fn new(
name: &str,
signature: &Signature,
return_type: &ReturnTypeFunction,
accumulator: &AccumulatorFunctionImplementation,
state_type: &StateTypeFunction
) -> Self
Create a new AggregateUDF
Trait Implementations
sourceimpl Clone for AggregateUDF
impl Clone for AggregateUDF
sourcefn clone(&self) -> AggregateUDF
fn clone(&self) -> AggregateUDF
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AggregateUDF
impl Debug for AggregateUDF
sourceimpl Hash for AggregateUDF
impl Hash for AggregateUDF
Auto Trait Implementations
impl !RefUnwindSafe for AggregateUDF
impl Send for AggregateUDF
impl Sync for AggregateUDF
impl Unpin for AggregateUDF
impl !UnwindSafe for AggregateUDF
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more