Enum TypeSignatureClass
pub enum TypeSignatureClass {
Timestamp,
Time,
Interval,
Duration,
Native(Arc<dyn LogicalType>),
Integer,
Binary,
}Expand description
Represents the class of types that can be used in a function signature.
This is used to specify what types are valid for function arguments in a more flexible way than just listing specific DataTypes. For example, TypeSignatureClass::Timestamp matches any timestamp type regardless of timezone or precision.
Used primarily with TypeSignature::Coercible to define function signatures that can accept
arguments that can be coerced to a particular class of types.
Variants§
Timestamp
Time
Interval
Duration
Native(Arc<dyn LogicalType>)
Integer
Binary
Encompasses both the native Binary as well as arbitrarily sized FixedSizeBinary types
Implementations§
§impl TypeSignatureClass
impl TypeSignatureClass
pub fn matches_native_type(&self, logical_type: &NativeType) -> bool
pub fn matches_native_type(&self, logical_type: &NativeType) -> bool
Does the specified NativeType match this type signature class?
pub fn default_casted_type(
&self,
native_type: &NativeType,
origin_type: &DataType,
) -> Result<DataType, DataFusionError>
pub fn default_casted_type( &self, native_type: &NativeType, origin_type: &DataType, ) -> Result<DataType, DataFusionError>
What type would origin_type be casted to when casting to the specified native type?
Trait Implementations§
§impl Clone for TypeSignatureClass
impl Clone for TypeSignatureClass
§fn clone(&self) -> TypeSignatureClass
fn clone(&self) -> TypeSignatureClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TypeSignatureClass
impl Debug for TypeSignatureClass
§impl Display for TypeSignatureClass
impl Display for TypeSignatureClass
§impl Hash for TypeSignatureClass
impl Hash for TypeSignatureClass
§impl PartialEq for TypeSignatureClass
impl PartialEq for TypeSignatureClass
§impl PartialOrd for TypeSignatureClass
impl PartialOrd for TypeSignatureClass
impl Eq for TypeSignatureClass
impl StructuralPartialEq for TypeSignatureClass
Auto Trait Implementations§
impl Freeze for TypeSignatureClass
impl !RefUnwindSafe for TypeSignatureClass
impl Send for TypeSignatureClass
impl Sync for TypeSignatureClass
impl Unpin for TypeSignatureClass
impl !UnwindSafe for TypeSignatureClass
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.