Skip to content

Commit

Permalink
fix: do not drop metadata when From<DFSchema> to arrow's Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedld committed Sep 28, 2024
1 parent c184d77 commit 370069a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datafusion/common/src/dfschema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,10 @@ impl TryFrom<SchemaRef> for DFSchema {

impl From<DFSchema> for SchemaRef {
fn from(df_schema: DFSchema) -> Self {
SchemaRef::new(df_schema.into())
Arc::new(Schema::new_with_metadata(
df_schema.fields().to_owned(),
HashMap::new(),
))
}
}

Expand Down

0 comments on commit 370069a

Please sign in to comment.