Skip to main content

LazyVariadicFunc

Trait LazyVariadicFunc 

Source
pub(crate) trait LazyVariadicFunc: Display {
    // Required methods
    fn eval<'a>(
        &'a self,
        datums: &[Datum<'a>],
        temp_storage: &'a RowArena,
        exprs: &'a [MirScalarExpr],
    ) -> Result<Datum<'a>, EvalError>;
    fn output_type(&self, input_types: &[SqlColumnType]) -> SqlColumnType;
    fn propagates_nulls(&self) -> bool;
    fn introduces_nulls(&self) -> bool;

    // Provided methods
    fn could_error(&self) -> bool { ... }
    fn is_monotone(&self) -> bool { ... }
    fn is_associative(&self) -> bool { ... }
    fn is_infix_op(&self) -> bool { ... }
}

Required Methods§

Source

fn eval<'a>( &'a self, datums: &[Datum<'a>], temp_storage: &'a RowArena, exprs: &'a [MirScalarExpr], ) -> Result<Datum<'a>, EvalError>

Source

fn output_type(&self, input_types: &[SqlColumnType]) -> SqlColumnType

The output SqlColumnType of this function.

Source

fn propagates_nulls(&self) -> bool

Whether this function will produce NULL on NULL input.

Source

fn introduces_nulls(&self) -> bool

Whether this function will produce NULL on non-NULL input.

Provided Methods§

Source

fn could_error(&self) -> bool

Whether this function might error on non-error input.

Source

fn is_monotone(&self) -> bool

Returns true if the function is monotone.

Source

fn is_associative(&self) -> bool

Returns true if the function is associative.

Source

fn is_infix_op(&self) -> bool

Returns true if the function is an infix operator.

Implementors§

Source§

impl LazyVariadicFunc for And

Source§

impl LazyVariadicFunc for Coalesce

Source§

impl LazyVariadicFunc for ErrorIfNull

Source§

impl LazyVariadicFunc for Greatest

Source§

impl LazyVariadicFunc for Least

Source§

impl LazyVariadicFunc for Or

Source§

impl<T: EagerVariadicFunc> LazyVariadicFunc for T

Blanket LazyVariadicFunc impl for each eager type, bridging expression evaluation and null propagation via InputDatumType::try_from_iter.