pub trait Compute: Send + Sync {
// Required methods
fn manifest(&self) -> &TransformManifest;
fn run(&self, inputs: &[RecordBatch]) -> Result<RecordBatch, ComputeError>;
}Expand description
A loaded, ready-to-invoke transform. Cheap to call per batch (any expensive setup happened in
TransformBackend::load). Send + Sync so it can be shared across partition workers.
Required Methods§
Sourcefn manifest(&self) -> &TransformManifest
fn manifest(&self) -> &TransformManifest
The manifest this compute was loaded from.
Sourcefn run(&self, inputs: &[RecordBatch]) -> Result<RecordBatch, ComputeError>
fn run(&self, inputs: &[RecordBatch]) -> Result<RecordBatch, ComputeError>
Transform one set of input batches into one output batch (batch-vectorized). The number of
input batches matches manifest().inputs. Returns ComputeError to fail closed —
governance wraps this; the compute never touches the write path.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".