Trait SchemaAdapterFactory

Source
pub trait SchemaAdapterFactory:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn create(
        &self,
        projected_table_schema: SchemaRef,
        table_schema: SchemaRef,
    ) -> Box<dyn SchemaAdapter>;
}
Expand description

Factory for creating SchemaAdapter

This interface provides a way to implement custom schema adaptation logic for DataSourceExec (for example, to fill missing columns with default value other than null).

Most users should use DefaultSchemaAdapterFactory. See that struct for more details and examples.

Required Methods§

Source

fn create( &self, projected_table_schema: SchemaRef, table_schema: SchemaRef, ) -> Box<dyn SchemaAdapter>

Create a SchemaAdapter

Arguments:

  • projected_table_schema: The schema for the table, projected to include only the fields being output (projected) by the this mapping.

  • table_schema: The entire table schema for the table

Implementors§