pub trait SchemaMapper:
Debug
+ Send
+ Sync {
// Required methods
fn map_batch(
&self,
batch: RecordBatch,
) -> Result<RecordBatch, DataFusionError>;
fn map_column_statistics(
&self,
file_col_statistics: &[ColumnStatistics],
) -> Result<Vec<ColumnStatistics>, DataFusionError>;
}
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, DataFusionError>
fn map_batch(&self, batch: RecordBatch) -> Result<RecordBatch, DataFusionError>
Adapts a RecordBatch
to match the table_schema
Sourcefn map_column_statistics(
&self,
file_col_statistics: &[ColumnStatistics],
) -> Result<Vec<ColumnStatistics>, DataFusionError>
fn map_column_statistics( &self, file_col_statistics: &[ColumnStatistics], ) -> Result<Vec<ColumnStatistics>, DataFusionError>
Adapts file-level column Statistics
to match the table_schema