Trait iceberg::transform::TransformFunction

source ·
pub trait TransformFunction: Send + Sync {
    // Required methods
    fn transform(&self, input: ArrayRef) -> Result<ArrayRef>;
    fn transform_literal(&self, input: &Datum) -> Result<Option<Datum>>;

    // Provided method
    fn transform_literal_result(&self, input: &Datum) -> Result<Datum> { ... }
}
Expand description

TransformFunction is a trait that defines the interface for all transform functions.

Required Methods§

source

fn transform(&self, input: ArrayRef) -> Result<ArrayRef>

transform will take an input array and transform it into a new array. The implementation of this function will need to check and downcast the input to specific type.

source

fn transform_literal(&self, input: &Datum) -> Result<Option<Datum>>

transform_literal will take an input literal and transform it into a new literal.

Provided Methods§

source

fn transform_literal_result(&self, input: &Datum) -> Result<Datum>

A thin wrapper around transform_literal to return an error even when it’s None.

Implementors§