Expand description
SchemaAdapter and SchemaAdapterFactory to adapt file-level record batches to a table schema.
Adapter provides a method of translating the RecordBatches that come out of the physical format into how they should be used by DataFusion. For instance, a schema can be stored external to a parquet file that maps parquet logical types to arrow types.
Structsยง
- Default
Schema ๐Adapter - This SchemaAdapter requires both the table schema and the projected table
schema. See
SchemaMappingfor more details - Default
Schema Adapter Factory - Default
SchemaAdapterFactoryfor mapping schemas. - Schema
Mapping - The SchemaMapping struct holds a mapping from the file schema to the table schema and any necessary type conversions.
Traitsยง
- Schema
Adapter - Creates
SchemaMappers to map file-level [RecordBatch]es to a table schema, which may have a schema obtained from merging multiple file-level schemas. - Schema
Adapter Factory - Factory for creating
SchemaAdapter - Schema
Mapper - Maps, columns from a specific file schema to the table schema.
Functionsยง
- can_
cast_ ๐field - Checks if a file field can be cast to a table field
- create_
field_ ๐mapping - Helper function that creates field mappings between file schema and table schema
Type Aliasesยง
- Cast
Column Fn - Function used by
SchemaMappingto adapt a column from the file schema to the table schema.