pub enum EvalMode {
Legacy,
Ansi,
Try,
}
Expand description
Spark supports three evaluation modes when evaluating expressions, which affect the behavior when processing input values that are invalid or would result in an error, such as divide by zero errors, and also affects behavior when converting between types.
Variants§
Legacy
Legacy is the default behavior in Spark prior to Spark 4.0. This mode silently ignores or replaces errors during SQL operations. Operations resulting in errors (like division by zero) will produce NULL values instead of failing. Legacy mode also enables implicit type conversions.
Ansi
Adheres to the ANSI SQL standard for error handling by throwing exceptions for operations that result in errors. Does not perform implicit type conversions.
Try
Same as Ansi mode, except that it converts errors to NULL values without failing the entire query.
Trait Implementations§
impl Copy for EvalMode
impl Eq for EvalMode
impl StructuralPartialEq for EvalMode
Auto Trait Implementations§
impl Freeze for EvalMode
impl RefUnwindSafe for EvalMode
impl Send for EvalMode
impl Sync for EvalMode
impl Unpin for EvalMode
impl UnwindSafe for EvalMode
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
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<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