diff --git a/crates/iceberg/src/avro/schema.rs b/crates/iceberg/src/avro/schema.rs index 8c3d07a590..2411c318fc 100644 --- a/crates/iceberg/src/avro/schema.rs +++ b/crates/iceberg/src/avro/schema.rs @@ -33,7 +33,7 @@ use crate::spec::{ use crate::{Error, ErrorKind, Result, ensure_data_valid}; const ELEMENT_ID: &str = "element-id"; -const FILED_ID_PROP: &str = "field-id"; +const FIELD_ID_PROP: &str = "field-id"; const KEY_ID: &str = "key-id"; const VALUE_ID: &str = "value-id"; const UUID_BYTES: usize = 16; @@ -96,7 +96,7 @@ impl SchemaVisitor for SchemaToAvroSchema { avro_record_field.default = Some(Value::Null); } avro_record_field.custom_attributes.insert( - FILED_ID_PROP.to_string(), + FIELD_ID_PROP.to_string(), Value::Number(Number::from(field.id)), ); @@ -178,7 +178,7 @@ impl SchemaVisitor for SchemaToAvroSchema { custom_attributes: Default::default(), }; field.custom_attributes.insert( - FILED_ID_PROP.to_string(), + FIELD_ID_PROP.to_string(), Value::Number(Number::from(map.key_field.id)), ); field @@ -196,7 +196,7 @@ impl SchemaVisitor for SchemaToAvroSchema { custom_attributes: Default::default(), }; field.custom_attributes.insert( - FILED_ID_PROP.to_string(), + FIELD_ID_PROP.to_string(), Value::Number(Number::from(map.value_field.id)), ); field @@ -444,7 +444,7 @@ impl AvroSchemaVisitor for AvroSchemaToSchema { let mut fields = Vec::with_capacity(field_types.len()); for (avro_field, field_type) in record.fields.iter().zip_eq(field_types) { let field_id = - Self::get_element_id_from_attributes(&avro_field.custom_attributes, FILED_ID_PROP)?; + Self::get_element_id_from_attributes(&avro_field.custom_attributes, FIELD_ID_PROP)?; let optional = is_avro_optional(&avro_field.schema); @@ -585,11 +585,11 @@ impl AvroSchemaVisitor for AvroSchemaToSchema { })?; let key_id = Self::get_element_id_from_attributes( &array.fields[0].custom_attributes, - FILED_ID_PROP, + FIELD_ID_PROP, )?; let value_id = Self::get_element_id_from_attributes( &array.fields[1].custom_attributes, - FILED_ID_PROP, + FIELD_ID_PROP, )?; let key_field = NestedField::map_key_element(key_id, key); let value_field = NestedField::map_value_element(