Struct datafusion_expr::expr_fn::SimpleScalarUDF
source · pub struct SimpleScalarUDF { /* private fields */ }
Expand description
Implements ScalarUDFImpl
for functions that have a single signature and
return type.
Implementations§
source§impl SimpleScalarUDF
impl SimpleScalarUDF
sourcepub fn new(
name: impl Into<String>,
input_types: Vec<DataType>,
return_type: DataType,
volatility: Volatility,
fun: ScalarFunctionImplementation
) -> Self
pub fn new( name: impl Into<String>, input_types: Vec<DataType>, return_type: DataType, volatility: Volatility, fun: ScalarFunctionImplementation ) -> Self
Create a new SimpleScalarUDF
from a name, input types, return type and
implementation. Implementing ScalarUDFImpl
allows more flexibility
Trait Implementations§
source§impl Debug for SimpleScalarUDF
impl Debug for SimpleScalarUDF
source§impl ScalarUDFImpl for SimpleScalarUDF
impl ScalarUDFImpl for SimpleScalarUDF
source§fn signature(&self) -> &Signature
fn signature(&self) -> &Signature
Returns the function’s
Signature
for information about what input
types are accepted and the function’s Volatility.source§fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType>
fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType>
What [
DataType
] will be returned by this function, given the types of
the argumentssource§fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue>
fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue>
Invoke the function on
args
, returning the appropriate result Read moresource§fn aliases(&self) -> &[String]
fn aliases(&self) -> &[String]
Returns any aliases (alternate names) for this function. Read more
source§fn monotonicity(&self) -> Result<Option<FuncMonotonicity>>
fn monotonicity(&self) -> Result<Option<FuncMonotonicity>>
This function specifies monotonicity behaviors for User defined scalar functions.
Auto Trait Implementations§
impl !RefUnwindSafe for SimpleScalarUDF
impl Send for SimpleScalarUDF
impl Sync for SimpleScalarUDF
impl Unpin for SimpleScalarUDF
impl !UnwindSafe for SimpleScalarUDF
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