pub struct PowerFunc { /* private fields */ }
Implementations§
Trait Implementations§
source§impl ScalarUDFImpl for PowerFunc
impl ScalarUDFImpl for PowerFunc
source§fn simplify(
&self,
args: Vec<Expr>,
info: &dyn SimplifyInfo
) -> Result<ExprSimplifyResult, DataFusionError>
fn simplify( &self, args: Vec<Expr>, info: &dyn SimplifyInfo ) -> Result<ExprSimplifyResult, DataFusionError>
Simplify the power
function by the relevant rules:
- Power(a, 0) ===> 0
- Power(a, 1) ===> a
- Power(a, Log(a, b)) ===> b
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, DataFusionError>
fn return_type( &self, arg_types: &[DataType] ) -> Result<DataType, DataFusionError>
source§fn aliases(&self) -> &[String]
fn aliases(&self) -> &[String]
Returns any aliases (alternate names) for this function. Read more
source§fn invoke(
&self,
args: &[ColumnarValue]
) -> Result<ColumnarValue, DataFusionError>
fn invoke( &self, args: &[ColumnarValue] ) -> Result<ColumnarValue, DataFusionError>
Invoke the function on
args
, returning the appropriate result Read moresource§fn return_type_from_exprs(
&self,
_args: &[Expr],
_schema: &dyn ExprSchema,
arg_types: &[DataType]
) -> Result<DataType, DataFusionError>
fn return_type_from_exprs( &self, _args: &[Expr], _schema: &dyn ExprSchema, arg_types: &[DataType] ) -> Result<DataType, DataFusionError>
source§fn invoke_no_args(
&self,
_number_rows: usize
) -> Result<ColumnarValue, DataFusionError>
fn invoke_no_args( &self, _number_rows: usize ) -> Result<ColumnarValue, DataFusionError>
Invoke the function without
args
, instead the number of rows are provided,
returning the appropriate result.source§fn monotonicity(&self) -> Result<Option<Vec<Option<bool>>>, DataFusionError>
fn monotonicity(&self) -> Result<Option<Vec<Option<bool>>>, DataFusionError>
This function specifies monotonicity behaviors for User defined scalar functions.
source§fn short_circuits(&self) -> bool
fn short_circuits(&self) -> bool
Returns true if some of this
exprs
subexpressions may not be evaluated
and thus any side effects (like divide by zero) may not be encountered
Setting this to true prevents certain optimizations such as common subexpression eliminationAuto Trait Implementations§
impl Freeze for PowerFunc
impl RefUnwindSafe for PowerFunc
impl Send for PowerFunc
impl Sync for PowerFunc
impl Unpin for PowerFunc
impl UnwindSafe for PowerFunc
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> 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