pub struct ImplicitCoercion { /* private fields */ }
Expand description
Defines rules for implicit type coercion, specifying which source types can be coerced and the default type to use when coercing.
This is used by functions to specify which types they can accept via implicit coercion in addition to their primary desired type.
§Examples
use arrow::datatypes::TimeUnit;
use datafusion_expr_common::signature::{Coercion, ImplicitCoercion, TypeSignatureClass};
use datafusion_common::types::{NativeType, logical_binary};
// Allow coercing from binary types to timestamp, coerce to specific timestamp unit and timezone
let implicit = Coercion::new_implicit(
TypeSignatureClass::Timestamp,
vec![TypeSignatureClass::Native(logical_binary())],
NativeType::Timestamp(TimeUnit::Second, None),
);
Trait Implementations§
Source§impl Clone for ImplicitCoercion
impl Clone for ImplicitCoercion
Source§fn clone(&self) -> ImplicitCoercion
fn clone(&self) -> ImplicitCoercion
Returns a copy 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 moreSource§impl Debug for ImplicitCoercion
impl Debug for ImplicitCoercion
Source§impl Display for ImplicitCoercion
impl Display for ImplicitCoercion
Source§impl Hash for ImplicitCoercion
impl Hash for ImplicitCoercion
Source§impl PartialEq for ImplicitCoercion
impl PartialEq for ImplicitCoercion
Source§impl PartialOrd for ImplicitCoercion
impl PartialOrd for ImplicitCoercion
impl Eq for ImplicitCoercion
Auto Trait Implementations§
impl Freeze for ImplicitCoercion
impl !RefUnwindSafe for ImplicitCoercion
impl Send for ImplicitCoercion
impl Sync for ImplicitCoercion
impl Unpin for ImplicitCoercion
impl !UnwindSafe for ImplicitCoercion
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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<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