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,
) -> HigherOrderSignature
pub fn new( type_signature: HigherOrderTypeSignature, volatility: Volatility, ) -> HigherOrderSignature
Creates a new HigherOrderSignature from a given type signature and volatility.
Sourcepub fn user_defined(volatility: Volatility) -> HigherOrderSignature
pub fn user_defined(volatility: Volatility) -> HigherOrderSignature
User-defined coercion rules for the function.
Sourcepub fn variadic_any(volatility: Volatility) -> HigherOrderSignature
pub fn variadic_any(volatility: Volatility) -> HigherOrderSignature
An arbitrary number of lambdas or arguments of any type.
Sourcepub fn any(arg_count: usize, volatility: Volatility) -> HigherOrderSignature
pub fn any(arg_count: usize, volatility: Volatility) -> HigherOrderSignature
A specified number of arguments of any type
Sourcepub fn exact(
args: Vec<ValueOrLambda<(), ()>>,
volatility: Volatility,
) -> HigherOrderSignature
pub fn exact( args: Vec<ValueOrLambda<(), ()>>, volatility: Volatility, ) -> HigherOrderSignature
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§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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