pub struct ArrowEngineData { /* private fields */ }Expand description
ArrowEngineData holds an Arrow RecordBatch, implements EngineData so the kernel can extract from it.
WARNING: Row visitors require that all leaf columns of the record batch have correctly computed
NULL masks. The arrow parquet reader is known to produce incomplete NULL masks, for
example. When in doubt, call fix_nested_null_masks first.
Implementations§
Source§impl ArrowEngineData
impl ArrowEngineData
Sourcepub fn new(data: RecordBatch) -> ArrowEngineData
pub fn new(data: RecordBatch) -> ArrowEngineData
Create a new ArrowEngineData from a RecordBatch
Sourcepub fn try_from_engine_data(
engine_data: Box<dyn EngineData>,
) -> Result<Box<ArrowEngineData>, Error>
pub fn try_from_engine_data( engine_data: Box<dyn EngineData>, ) -> Result<Box<ArrowEngineData>, Error>
Utility constructor to get a Box<ArrowEngineData> out of a Box<dyn EngineData>
Sourcepub fn record_batch(&self) -> &RecordBatch
pub fn record_batch(&self) -> &RecordBatch
Get a reference to the RecordBatch this ArrowEngineData is wrapping
Trait Implementations§
Source§impl EngineData for ArrowEngineData
impl EngineData for ArrowEngineData
Source§fn visit_rows(
&self,
leaf_columns: &[ColumnName],
visitor: &mut dyn RowVisitor,
) -> Result<(), Error>
fn visit_rows( &self, leaf_columns: &[ColumnName], visitor: &mut dyn RowVisitor, ) -> Result<(), Error>
Visits a subset of leaf columns in each row of this data, passing a
GetData item for each
requested column to the visitor’s visit method (along with the number of rows of data to
be visited).Source§fn append_columns(
&self,
schema: Arc<StructType>,
columns: Vec<ArrayData>,
) -> Result<Box<dyn EngineData>, Error>
fn append_columns( &self, schema: Arc<StructType>, columns: Vec<ArrayData>, ) -> Result<Box<dyn EngineData>, Error>
Append new columns provided by Kernel to the existing data. Read more
Source§fn apply_selection_vector(
self: Box<ArrowEngineData>,
selection_vector: Vec<bool>,
) -> Result<Box<dyn EngineData>, Error>
fn apply_selection_vector( self: Box<ArrowEngineData>, selection_vector: Vec<bool>, ) -> Result<Box<dyn EngineData>, Error>
Apply a selection vector to the data and return a data where only the valid rows are
included. This consumes the EngineData, allowing engines to implement this “in place” if
desired
Source§impl From<RecordBatch> for ArrowEngineData
impl From<RecordBatch> for ArrowEngineData
Source§fn from(value: RecordBatch) -> ArrowEngineData
fn from(value: RecordBatch) -> ArrowEngineData
Converts to this type from the input type.
Source§impl From<StructArray> for ArrowEngineData
impl From<StructArray> for ArrowEngineData
Source§fn from(value: StructArray) -> ArrowEngineData
fn from(value: StructArray) -> ArrowEngineData
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ArrowEngineData
impl !RefUnwindSafe for ArrowEngineData
impl Send for ArrowEngineData
impl Sync for ArrowEngineData
impl Unpin for ArrowEngineData
impl !UnwindSafe for ArrowEngineData
Blanket Implementations§
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
Obtains a
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
Obtains an
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Converts the object to
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Convenient wrapper for
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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