Trait polars_compute::if_then_else::IfThenElseKernel

source ·
pub trait IfThenElseKernel: Sized + Array {
    type Scalar<'a>;

    // Required methods
    fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self;
    fn if_then_else_broadcast_true(
        mask: &Bitmap,
        if_true: Self::Scalar<'_>,
        if_false: &Self,
    ) -> Self;
    fn if_then_else_broadcast_false(
        mask: &Bitmap,
        if_true: &Self,
        if_false: Self::Scalar<'_>,
    ) -> Self;
    fn if_then_else_broadcast_both(
        dtype: ArrowDataType,
        mask: &Bitmap,
        if_true: Self::Scalar<'_>,
        if_false: Self::Scalar<'_>,
    ) -> Self;
}

Required Associated Types§

source

type Scalar<'a>

Required Methods§

source

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source

fn if_then_else_broadcast_both( dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IfThenElseKernel for BooleanArray

§

type Scalar<'a> = bool

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( _dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

source§

impl IfThenElseKernel for FixedSizeListArray

§

type Scalar<'a> = Box<dyn Array>

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

source§

impl IfThenElseKernel for ListArray<i64>

§

type Scalar<'a> = Box<dyn Array>

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

source§

impl IfThenElseKernel for BinaryViewArray

§

type Scalar<'a> = &'a [u8]

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

source§

impl IfThenElseKernel for Utf8ViewArray

§

type Scalar<'a> = &'a str

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

source§

impl<T: NotSimdPrimitive> IfThenElseKernel for PrimitiveArray<T>

§

type Scalar<'a> = T

source§

fn if_then_else(mask: &Bitmap, if_true: &Self, if_false: &Self) -> Self

source§

fn if_then_else_broadcast_true( mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: &Self, ) -> Self

source§

fn if_then_else_broadcast_false( mask: &Bitmap, if_true: &Self, if_false: Self::Scalar<'_>, ) -> Self

source§

fn if_then_else_broadcast_both( _dtype: ArrowDataType, mask: &Bitmap, if_true: Self::Scalar<'_>, if_false: Self::Scalar<'_>, ) -> Self

Implementors§