pub struct BatchAdapter { /* private fields */ }Expand description
Adapter for transforming record batches to match a target schema.
Create instances via BatchAdapterFactory.
§Performance
The adapter pre-computes the projection expressions during creation,
so the adapt_batch call is efficient and suitable
for use in hot paths like streaming file scans.
Implementations§
Source§impl BatchAdapter
impl BatchAdapter
Sourcepub fn adapt_batch(&self, batch: &RecordBatch) -> Result<RecordBatch>
pub fn adapt_batch(&self, batch: &RecordBatch) -> Result<RecordBatch>
Adapt the given record batch to match the target schema.
The input batch must conform to the source schema used when creating this adapter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchAdapter
impl !RefUnwindSafe for BatchAdapter
impl Send for BatchAdapter
impl Sync for BatchAdapter
impl Unpin for BatchAdapter
impl UnsafeUnpin for BatchAdapter
impl !UnwindSafe for BatchAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more