Skip to main content

Transform

Trait Transform 

Source
pub trait Transform {
    type Source: Array;
    type Target: Array;

    // Required method
    fn transform(&self, source: &Self::Source) -> Result<Self::Target, Error>;

    // Provided method
    fn then<T2>(self, next: T2) -> Compose<Self, T2>
       where Self: Sized,
             T2: Transform<Source = Self::Target> { ... }
}
Expand description

A transformation that converts one Arrow array type to another.

Transformations are read-only operations that may fail (e.g., missing field, type mismatch). They can be composed using the then method to create complex transformation pipelines.

Required Associated Types§

Source

type Source: Array

The source array type.

Source

type Target: Array

The target array type.

Required Methods§

Source

fn transform(&self, source: &Self::Source) -> Result<Self::Target, Error>

Apply the transformation to the source array.

Provided Methods§

Source

fn then<T2>(self, next: T2) -> Compose<Self, T2>
where Self: Sized, T2: Transform<Source = Self::Target>,

Chain this transformation with another transformation.

Implementors§

Source§

impl Transform for &Selector

Source§

impl Transform for ListToFixedSizeList

Source§

impl Transform for StringPrefix

Source§

impl Transform for StringSuffix

Source§

impl Transform for Explode

Source§

impl Transform for Flatten

Source§

impl Transform for GetField

Source§

impl Transform for RowMajorToColumnMajor

Source§

impl Transform for StructToFixedList

Source§

impl Transform for Selector

Source§

impl<S, F, T> Transform for MapPrimitive<S, F, T>

Source§

impl<S, T> Transform for PrimitiveCast<PrimitiveArray<S>, PrimitiveArray<T>>

Source§

impl<T1, T2, M> Transform for Compose<T1, T2>
where T1: Transform<Target = M>, T2: Transform<Source = M>, M: Array,

Source§

impl<T> Transform for DowncastRef<T>

Source§

impl<T> Transform for ReplaceNull<T>

Source§

impl<T, S, U> Transform for MapFixedSizeList<T>
where T: Transform<Source = S, Target = U>, S: Array + 'static, U: Array + 'static,

Source§

impl<T, S, U> Transform for MapList<T>
where T: Transform<Source = S, Target = U>, S: Array + 'static, U: Array + 'static,