pub(crate) struct DefaultSchemaAdapter {
projected_table_schema: SchemaRef,
}Expand description
This SchemaAdapter requires both the table schema and the projected table
schema. See SchemaMapping for more details
Fields§
§projected_table_schema: SchemaRefThe schema for the table, projected to include only the fields being output (projected) by the associated ParquetSource
Trait Implementations§
Source§impl Clone for DefaultSchemaAdapter
impl Clone for DefaultSchemaAdapter
Source§fn clone(&self) -> DefaultSchemaAdapter
fn clone(&self) -> DefaultSchemaAdapter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DefaultSchemaAdapter
impl Debug for DefaultSchemaAdapter
Source§impl SchemaAdapter for DefaultSchemaAdapter
impl SchemaAdapter for DefaultSchemaAdapter
Source§fn map_column_index(&self, index: usize, file_schema: &Schema) -> Option<usize>
fn map_column_index(&self, index: usize, file_schema: &Schema) -> Option<usize>
Map a column index in the table schema to a column index in a particular file schema
Panics if index is not in range for the table schema
Source§fn map_schema(
&self,
file_schema: &Schema,
) -> Result<(Arc<dyn SchemaMapper>, Vec<usize>)>
fn map_schema( &self, file_schema: &Schema, ) -> Result<(Arc<dyn SchemaMapper>, Vec<usize>)>
Creates a SchemaMapping for casting or mapping the columns from the
file schema to the table schema.
If the provided file_schema contains columns of a different type to
the expected table_schema, the method will attempt to cast the array
data from the file schema to the table schema where possible.
Returns a SchemaMapping that can be applied to the output batch
along with an ordered list of columns to project from the file
Auto Trait Implementations§
impl Freeze for DefaultSchemaAdapter
impl RefUnwindSafe for DefaultSchemaAdapter
impl Send for DefaultSchemaAdapter
impl Sync for DefaultSchemaAdapter
impl Unpin for DefaultSchemaAdapter
impl UnwindSafe for DefaultSchemaAdapter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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