pub struct RecordBatchProjector { /* private fields */ }Expand description
Help to project specific field from `RecordBatch`` according to the fields id.
Implementations§
Source§impl RecordBatchProjector
impl RecordBatchProjector
Sourcepub fn from_iceberg_schema(
iceberg_schema: Arc<IcebergSchema>,
target_field_ids: &[i32],
) -> Result<Self>
pub fn from_iceberg_schema( iceberg_schema: Arc<IcebergSchema>, target_field_ids: &[i32], ) -> Result<Self>
Create RecordBatchProjector using Iceberg schema.
This constructor converts the Iceberg schema to Arrow schema with field ID metadata, then uses the standard field ID lookup for projection.
§Arguments
iceberg_schema- The Iceberg schema for field ID mappingtarget_field_ids- The field IDs to project
Sourcepub fn project_column(&self, batch: &[ArrayRef]) -> Result<Vec<ArrayRef>>
pub fn project_column(&self, batch: &[ArrayRef]) -> Result<Vec<ArrayRef>>
Do projection with columns
Trait Implementations§
Source§impl Clone for RecordBatchProjector
impl Clone for RecordBatchProjector
Source§fn clone(&self) -> RecordBatchProjector
fn clone(&self) -> RecordBatchProjector
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecordBatchProjector
impl Debug for RecordBatchProjector
Source§impl PartialEq for RecordBatchProjector
impl PartialEq for RecordBatchProjector
impl Eq for RecordBatchProjector
impl StructuralPartialEq for RecordBatchProjector
Auto Trait Implementations§
impl Freeze for RecordBatchProjector
impl RefUnwindSafe for RecordBatchProjector
impl Send for RecordBatchProjector
impl Sync for RecordBatchProjector
impl Unpin for RecordBatchProjector
impl UnwindSafe for RecordBatchProjector
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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