pub enum BuiltinScalarFunction {
Show 47 variants
Atan,
Atan2,
Acosh,
Asinh,
Atanh,
Cbrt,
Ceil,
Coalesce,
Cos,
Cosh,
Degrees,
Exp,
Factorial,
Floor,
Gcd,
Lcm,
Iszero,
Ln,
Log,
Log10,
Log2,
Nanvl,
Pi,
Power,
Radians,
Round,
Signum,
Sin,
Sinh,
Sqrt,
Trunc,
Cot,
Concat,
ConcatWithSeparator,
EndsWith,
InitCap,
Left,
Lpad,
Random,
Reverse,
Right,
Rpad,
Strpos,
Substr,
Translate,
SubstrIndex,
FindInSet,
}
Expand description
Enum of all built-in scalar functions
Variants§
Atan
atan
Atan2
atan2
Acosh
acosh
Asinh
asinh
Atanh
atanh
Cbrt
cbrt
Ceil
ceil
Coalesce
coalesce
Cos
cos
Cosh
cos
Degrees
degrees
Exp
exp
Factorial
factorial
Floor
floor
Gcd
gcd, Greatest common divisor
Lcm
lcm, Least common multiple
Iszero
iszero
Ln
ln, Natural logarithm
Log
log, same as log10
Log10
log10
Log2
log2
Nanvl
nanvl
Pi
pi
Power
power
Radians
radians
Round
round
Signum
signum
Sin
sin
Sinh
sinh
Sqrt
sqrt
Trunc
trunc
Cot
cot
Concat
concat
ConcatWithSeparator
concat_ws
EndsWith
ends_with
InitCap
initcap
Left
left
Lpad
lpad
Random
random
Reverse
reverse
Right
right
Rpad
rpad
Strpos
strpos
Substr
substr
Translate
translate
SubstrIndex
substr_index
FindInSet
find_in_set
Implementations§
source§impl BuiltinScalarFunction
impl BuiltinScalarFunction
sourcepub fn supports_zero_argument(&self) -> bool
👎Deprecated since 32.0.0: please use TypeSignature::supports_zero_argument instead
pub fn supports_zero_argument(&self) -> bool
an allowlist of functions to take zero arguments, so that they will get special treatment while executing.
sourcepub fn volatility(&self) -> Volatility
pub fn volatility(&self) -> Volatility
Returns the Volatility of the builtin function.
sourcepub fn return_type(
self,
input_expr_types: &[DataType]
) -> Result<DataType, DataFusionError>
pub fn return_type( self, input_expr_types: &[DataType] ) -> Result<DataType, DataFusionError>
Returns the output DataType
of this function
This method should be invoked only after input_expr_types
have been validated
against the function’s TypeSignature
using type_coercion::functions::data_types()
.
This method will:
- Perform additional checks on
input_expr_types
that are beyond the scope ofTypeSignature
validation. - Deduce the output
DataType
based on the providedinput_expr_types
.
Trait Implementations§
source§impl Clone for BuiltinScalarFunction
impl Clone for BuiltinScalarFunction
source§fn clone(&self) -> BuiltinScalarFunction
fn clone(&self) -> BuiltinScalarFunction
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 BuiltinScalarFunction
impl Debug for BuiltinScalarFunction
source§impl Display for BuiltinScalarFunction
impl Display for BuiltinScalarFunction
source§impl From<&ScalarFunction> for BuiltinScalarFunction
impl From<&ScalarFunction> for BuiltinScalarFunction
source§fn from(f: &ScalarFunction) -> BuiltinScalarFunction
fn from(f: &ScalarFunction) -> BuiltinScalarFunction
Converts to this type from the input type.
source§impl FromStr for BuiltinScalarFunction
impl FromStr for BuiltinScalarFunction
§type Err = DataFusionError
type Err = DataFusionError
The associated error which can be returned from parsing.
source§fn from_str(name: &str) -> Result<BuiltinScalarFunction, DataFusionError>
fn from_str(name: &str) -> Result<BuiltinScalarFunction, DataFusionError>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for BuiltinScalarFunction
impl Hash for BuiltinScalarFunction
source§impl PartialEq for BuiltinScalarFunction
impl PartialEq for BuiltinScalarFunction
source§fn eq(&self, other: &BuiltinScalarFunction) -> bool
fn eq(&self, other: &BuiltinScalarFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BuiltinScalarFunction
impl Eq for BuiltinScalarFunction
impl StructuralPartialEq for BuiltinScalarFunction
Auto Trait Implementations§
impl Freeze for BuiltinScalarFunction
impl RefUnwindSafe for BuiltinScalarFunction
impl Send for BuiltinScalarFunction
impl Sync for BuiltinScalarFunction
impl Unpin for BuiltinScalarFunction
impl UnwindSafe for BuiltinScalarFunction
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<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<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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 moreCreates a shared type from an unshared type.