Struct datafusion_expr::Signature 
source · pub struct Signature {
    pub type_signature: TypeSignature,
    pub volatility: Volatility,
}Expand description
Defines the supported argument types (TypeSignature) and Volatility for a function.
DataFusion will automatically coerce (cast) argument types to one of the supported function signatures, if possible.
Fields§
§type_signature: TypeSignatureThe data types that the function accepts. See TypeSignature for more information.
volatility: VolatilityThe volatility of the function. See Volatility for more information.
Implementations§
source§impl Signature
 
impl Signature
sourcepub fn new(type_signature: TypeSignature, volatility: Volatility) -> Self
 
pub fn new(type_signature: TypeSignature, volatility: Volatility) -> Self
Creates a new Signature from a given type signature and volatility.
sourcepub fn variadic(common_types: Vec<DataType>, volatility: Volatility) -> Self
 
pub fn variadic(common_types: Vec<DataType>, volatility: Volatility) -> Self
An arbitrary number of arguments with the same type, from those listed in common_types.
sourcepub fn variadic_equal(volatility: Volatility) -> Self
 
pub fn variadic_equal(volatility: Volatility) -> Self
An arbitrary number of arguments of the same type.
sourcepub fn variadic_any(volatility: Volatility) -> Self
 
pub fn variadic_any(volatility: Volatility) -> Self
An arbitrary number of arguments of any type.
sourcepub fn uniform(
    arg_count: usize,
    valid_types: Vec<DataType>,
    volatility: Volatility
) -> Self
 
pub fn uniform( arg_count: usize, valid_types: Vec<DataType>, volatility: Volatility ) -> Self
A fixed number of arguments of the same type, from those listed in valid_types.
sourcepub fn exact(exact_types: Vec<DataType>, volatility: Volatility) -> Self
 
pub fn exact(exact_types: Vec<DataType>, volatility: Volatility) -> Self
Exactly matches the types in exact_types, in order.
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 one_of(
    type_signatures: Vec<TypeSignature>,
    volatility: Volatility
) -> Self
 
pub fn one_of( type_signatures: Vec<TypeSignature>, volatility: Volatility ) -> Self
Any one of a list of TypeSignatures.
Trait Implementations§
source§impl PartialEq for Signature
 
impl PartialEq for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
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<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.