Skip to content

Commit d1e4e8c

Browse files
committed
avro: strip inferred schema metadata for stable runtime matching
1 parent 4c7944d commit d1e4e8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • datafusion/datasource-avro/src

datafusion/datasource-avro/src/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ pub fn read_avro_schema_from_reader<R: Read>(
4747
// Drop metadata from inferred schemas so runtime batches and inferred table schemas
4848
// compare consistently without requiring strict Avro metadata identity.
4949
Ok(strip_metadata_from_schema(
50-
avro_reader.schema().as_ref().clone(),
50+
avro_reader.schema().as_ref(),
5151
))
5252
}
5353

54-
fn strip_metadata_from_schema(schema: Schema) -> Schema {
54+
fn strip_metadata_from_schema(schema: &Schema) -> Schema {
5555
let fields = schema
5656
.fields
5757
.into_iter()

0 commit comments

Comments
 (0)