pub struct HigherOrderSignature {
pub type_signature: HigherOrderTypeSignature,
pub volatility: Volatility,
pub lambda_parameters_max_iterations: usize,
}Expand description
Provides information necessary for calling a higher order function.
-
HigherOrderTypeSignaturedefines the argument types that a function has implementations for. -
Volatilitydefines how the output of the function changes with the input.
Fields§
§type_signature: HigherOrderTypeSignatureThe data types that the function accepts. See HigherOrderTypeSignature for more information.
volatility: VolatilityThe volatility of the function. See Volatility for more information.
lambda_parameters_max_iterations: usizeThe max number of times to call HigherOrderUDFImpl::lambda_parameters before raising an error. Used to guard against implementations that causes an infinite loop by endlessly returning LambdaParametersProgress::Partial. Defaults to 256
Implementations§
Source§impl HigherOrderSignature
impl HigherOrderSignature
Sourcepub fn new(
type_signature: HigherOrderTypeSignature,
volatility: Volatility,
) -> Self
pub fn new( type_signature: HigherOrderTypeSignature, volatility: Volatility, ) -> Self
Creates a new HigherOrderSignature from a given type signature and volatility.
Sourcepub fn user_defined(volatility: Volatility) -> Self
pub fn user_defined(volatility: Volatility) -> Self
User-defined coercion rules for the function.
Sourcepub fn variadic_any(volatility: Volatility) -> Self
pub fn variadic_any(volatility: Volatility) -> Self
An arbitrary number of lambdas or arguments of any type.
Sourcepub fn any(arg_count: usize, volatility: Volatility) -> Self
pub fn any(arg_count: usize, volatility: Volatility) -> Self
A specified number of arguments of any type
Sourcepub fn exact(args: Vec<ValueOrLambda<(), ()>>, volatility: Volatility) -> Self
pub fn exact(args: Vec<ValueOrLambda<(), ()>>, volatility: Volatility) -> Self
Exactly the specified arguments in the given order, with arbitrary types.
DataFusion will call HigherOrderUDFImpl::coerce_value_types to prepare the value
argument types.
§Example
A function that takes one value argument followed by one lambda:
let sig = HigherOrderSignature::exact(
vec![ValueOrLambda::Value(()), ValueOrLambda::Lambda(())],
Volatility::Immutable,
);Trait Implementations§
Source§impl Clone for HigherOrderSignature
impl Clone for HigherOrderSignature
Source§fn clone(&self) -> HigherOrderSignature
fn clone(&self) -> HigherOrderSignature
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HigherOrderSignature
impl Debug for HigherOrderSignature
impl Eq for HigherOrderSignature
Source§impl Hash for HigherOrderSignature
impl Hash for HigherOrderSignature
Source§impl PartialEq for HigherOrderSignature
impl PartialEq for HigherOrderSignature
Source§fn eq(&self, other: &HigherOrderSignature) -> bool
fn eq(&self, other: &HigherOrderSignature) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HigherOrderSignature
impl PartialOrd for HigherOrderSignature
impl StructuralPartialEq for HigherOrderSignature
Auto Trait Implementations§
impl Freeze for HigherOrderSignature
impl RefUnwindSafe for HigherOrderSignature
impl Send for HigherOrderSignature
impl Sync for HigherOrderSignature
impl Unpin for HigherOrderSignature
impl UnsafeUnpin for HigherOrderSignature
impl UnwindSafe for HigherOrderSignature
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more