Enum datafusion_expr::Volatility
source · pub enum Volatility {
Immutable,
Stable,
Volatile,
}
Expand description
A function’s volatility, which defines the functions eligibility for certain optimizations
Variants
Immutable
Immutable - An immutable function will always return the same output when given the same input. An example of this is super::BuiltinScalarFunction::Cos.
Stable
Stable - A stable function may return different values given the same input across different queries but must return the same value for a given input within a query. An example of this is super::BuiltinScalarFunction::Now.
Volatile
Volatile - A volatile function may change the return value from evaluation to evaluation. Multiple invocations of a volatile function may return different results when used in the same query. An example of this is super::BuiltinScalarFunction::Random.
Trait Implementations
sourceimpl Clone for Volatility
impl Clone for Volatility
sourcefn clone(&self) -> Volatility
fn clone(&self) -> Volatility
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Volatility
impl Debug for Volatility
sourceimpl Hash for Volatility
impl Hash for Volatility
sourceimpl Ord for Volatility
impl Ord for Volatility
sourcefn cmp(&self, other: &Volatility) -> Ordering
fn cmp(&self, other: &Volatility) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Volatility> for Volatility
impl PartialEq<Volatility> for Volatility
sourcefn eq(&self, other: &Volatility) -> bool
fn eq(&self, other: &Volatility) -> bool
sourceimpl PartialOrd<Volatility> for Volatility
impl PartialOrd<Volatility> for Volatility
sourcefn partial_cmp(&self, other: &Volatility) -> Option<Ordering>
fn partial_cmp(&self, other: &Volatility) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Volatility
impl Eq for Volatility
impl StructuralEq for Volatility
impl StructuralPartialEq for Volatility
Auto Trait Implementations
impl RefUnwindSafe for Volatility
impl Send for Volatility
impl Sync for Volatility
impl Unpin for Volatility
impl UnwindSafe for Volatility
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more