pub struct DynProjection(/* private fields */);Expand description
Column projection descriptor used to derive projected dynamic views.
Implementations§
Source§impl DynProjection
impl DynProjection
Sourcepub fn from_indices<I>(
schema: &Schema,
indices: I,
) -> Result<Self, DynViewError>where
I: IntoIterator<Item = usize>,
pub fn from_indices<I>(
schema: &Schema,
indices: I,
) -> Result<Self, DynViewError>where
I: IntoIterator<Item = usize>,
Create a projection from explicit column indices.
§Errors
Returns DynViewError::ColumnOutOfBounds if any index exceeds the schema width.
Sourcepub fn from_schema(
source: &Schema,
projection: &Schema,
) -> Result<Self, DynViewError>
pub fn from_schema( source: &Schema, projection: &Schema, ) -> Result<Self, DynViewError>
Create a projection by matching a projected schema against the source schema.
Fields are matched by name; data type and nullability must also align.
§Errors
Returns DynViewError when a projected field is missing from the source schema or when its
metadata disagrees.
Sourcepub fn to_parquet_mask(&self) -> ParquetProjectionMask
pub fn to_parquet_mask(&self) -> ParquetProjectionMask
Returns the Parquet projection mask corresponding to this projection.
Sourcepub fn project_row_view<'a>(
&self,
schema: &'a DynSchema,
batch: &'a RecordBatch,
row: usize,
) -> Result<DynRowView<'a>, DynViewError>
pub fn project_row_view<'a>( &self, schema: &'a DynSchema, batch: &'a RecordBatch, row: usize, ) -> Result<DynRowView<'a>, DynViewError>
Project a single row from batch using this projection, returning a borrowed view.
§Errors
Returns DynViewError when schema validation fails, the row index is out of bounds,
or the projection width mismatches the batch.
Sourcepub fn project_row_raw(
&self,
schema: &DynSchema,
batch: &RecordBatch,
row: usize,
) -> Result<DynRowRaw, DynViewError>
pub fn project_row_raw( &self, schema: &DynSchema, batch: &RecordBatch, row: usize, ) -> Result<DynRowRaw, DynViewError>
Project a single row from batch and capture it as lifetime-erased raw cells.
Trait Implementations§
Source§impl Clone for DynProjection
impl Clone for DynProjection
Source§fn clone(&self) -> DynProjection
fn clone(&self) -> DynProjection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more