diff --git a/src/io/avro/read/deserialize.rs b/src/io/avro/read/deserialize.rs index 9fa9f152544..5f535650140 100644 --- a/src/io/avro/read/deserialize.rs +++ b/src/io/avro/read/deserialize.rs @@ -160,6 +160,7 @@ fn deserialize_value<'a>( let values = array.mut_values(index); block = deserialize_item(values, *is_nullable, &field.schema, block)?; } + array.try_push_valid()?; } _ => match data_type.to_physical_type() { PhysicalType::Boolean => { diff --git a/src/io/avro/read/nested.rs b/src/io/avro/read/nested.rs index 981b6894f9b..649a702ff9c 100644 --- a/src/io/avro/read/nested.rs +++ b/src/io/avro/read/nested.rs @@ -230,6 +230,14 @@ impl DynMutableStructArray { self.values[field].as_mut() } + #[inline] + pub fn try_push_valid(&mut self) -> Result<()> { + if let Some(validity) = &mut self.validity { + validity.push(true) + } + Ok(()) + } + #[inline] fn push_null(&mut self) { self.values.iter_mut().for_each(|x| x.push_null());