pub trait SchemaMapper:
Debug
+ Send
+ Sync {
// Required methods
fn map_batch(&self, batch: RecordBatch) -> Result<RecordBatch>;
fn map_column_statistics(
&self,
file_col_statistics: &[ColumnStatistics],
) -> Result<Vec<ColumnStatistics>>;
}
Expand description
Maps, columns from a specific file schema to the table schema.
See DefaultSchemaAdapterFactory
for more details and examples.
Required Methods§
Sourcefn map_batch(&self, batch: RecordBatch) -> Result<RecordBatch>
fn map_batch(&self, batch: RecordBatch) -> Result<RecordBatch>
Adapts a RecordBatch
to match the table_schema
Sourcefn map_column_statistics(
&self,
file_col_statistics: &[ColumnStatistics],
) -> Result<Vec<ColumnStatistics>>
fn map_column_statistics( &self, file_col_statistics: &[ColumnStatistics], ) -> Result<Vec<ColumnStatistics>>
Adapts file-level column Statistics
to match the table_schema