pub trait Transform: Send + Sync {
// Required method
fn apply(&self, batch: RecordBatch) -> Result<RecordBatch>;
}Expand description
A transform that can be applied to RecordBatches.
Transforms are the building blocks for data preprocessing pipelines. They take a RecordBatch and produce a new RecordBatch with the transformation applied.
§Thread Safety
All transforms must be thread-safe (Send + Sync) to support parallel data loading in future versions.
Required Methods§
Sourcefn apply(&self, batch: RecordBatch) -> Result<RecordBatch>
fn apply(&self, batch: RecordBatch) -> Result<RecordBatch>
Applies the transform to a RecordBatch.
§Errors
Returns an error if the transform cannot be applied to the batch.
Trait Implementations§
Implementations on Foreign Types§
Source§impl Transform for Box<dyn Transform>
impl Transform for Box<dyn Transform>
fn apply(&self, batch: RecordBatch) -> Result<RecordBatch>
Source§impl Transform for Arc<dyn Transform>
impl Transform for Arc<dyn Transform>
fn apply(&self, batch: RecordBatch) -> Result<RecordBatch>
Implementors§
impl Transform for Cast
impl Transform for Chain
impl Transform for Drop
impl Transform for FillNull
impl Transform for Normalize
impl Transform for Rename
impl Transform for Sample
Available on crate feature
shuffle only.impl Transform for Select
impl Transform for Shuffle
Available on crate feature
shuffle only.