Skip to content

Commit

Permalink
Make DefaultSchemaAdapterFactory public (#11709)
Browse files Browse the repository at this point in the history
This seems like a nice self-contained API that would be useful for downstream consumers of DataFusion
  • Loading branch information
adriangb authored Jul 31, 2024
1 parent 6508fa2 commit abeb8b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datafusion/core/src/datasource/schema_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ pub trait SchemaMapper: Debug + Send + Sync {
) -> datafusion_common::Result<RecordBatch>;
}

/// Basic implementation of [`SchemaAdapterFactory`] that maps columns by name
/// and casts columns to the expected type.
#[derive(Clone, Debug, Default)]
pub(crate) struct DefaultSchemaAdapterFactory {}
pub struct DefaultSchemaAdapterFactory {}

impl SchemaAdapterFactory for DefaultSchemaAdapterFactory {
fn create(&self, table_schema: SchemaRef) -> Box<dyn SchemaAdapter> {
Expand Down

0 comments on commit abeb8b4

Please sign in to comment.