rambleraptor commented on code in PR #1482: URL: https://github.com/apache/iceberg-rust/pull/1482#discussion_r2190779892
########## crates/iceberg/src/avro/schema.rs: ########## @@ -92,9 +127,12 @@ impl SchemaVisitor for SchemaToAvroSchema { custom_attributes: Default::default(), }; - if !field.required { + if let Some(default) = &field.initial_default { + avro_record_field.default = Some(literal_to_json(default)?); + } else if !field.required { avro_record_field.default = Some(Value::Null); } + Review Comment: Great idea! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org