polars::prelude

Trait ChunkApplyKernel

Source
pub trait ChunkApplyKernel<A>
where A: Array,
{ // Required methods fn apply_kernel(&self, f: &dyn Fn(&A) -> Box<dyn Array>) -> Self; fn apply_kernel_cast<S>( &self, f: &dyn Fn(&A) -> Box<dyn Array>, ) -> ChunkedArray<S> where S: PolarsDataType; }
Expand description

Apply kernels on the arrow array chunks in a ChunkedArray.

Required Methods§

Source

fn apply_kernel(&self, f: &dyn Fn(&A) -> Box<dyn Array>) -> Self

Apply kernel and return result as a new ChunkedArray.

Source

fn apply_kernel_cast<S>( &self, f: &dyn Fn(&A) -> Box<dyn Array>, ) -> ChunkedArray<S>
where S: PolarsDataType,

Apply a kernel that outputs an array of different type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ChunkApplyKernel<BinaryViewArrayGeneric<str>> for ChunkedArray<StringType>

Source§

impl ChunkApplyKernel<BinaryViewArrayGeneric<[u8]>> for ChunkedArray<BinaryType>

Source§

impl ChunkApplyKernel<BooleanArray> for ChunkedArray<BooleanType>

Source§

impl<T> ChunkApplyKernel<PrimitiveArray<<T as PolarsNumericType>::Native>> for ChunkedArray<T>