blackmwk commented on code in PR #2773:
URL: https://github.com/apache/iceberg-rust/pull/2773#discussion_r3977725816
##########
crates/iceberg/src/avro/schema.rs:
##########
@@ -126,7 +132,7 @@ impl SchemaVisitor for SchemaToAvroSchema {
record.name = Name::from(format!("r{}",
list.element_field.id).as_str());
}
- if !list.element_field.required {
+ if !list.element_field.required && !is_avro_null(&field_schema) {
Review Comment:
This should do same as line 78.
##########
crates/iceberg/src/avro/schema.rs:
##########
@@ -147,7 +153,7 @@ impl SchemaVisitor for SchemaToAvroSchema {
) -> Result<AvroSchemaOrField> {
let key_field_schema = key_value.unwrap_left();
let mut value_field_schema = value.unwrap_left();
- if !map.value_field.required {
+ if !map.value_field.required && !is_avro_null(&value_field_schema) {
Review Comment:
This should do same as line 78.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]