alamb commented on a change in pull request #736:
URL: https://github.com/apache/arrow-rs/pull/736#discussion_r705655571
##########
File path: arrow/src/array/array.rs
##########
@@ -448,18 +448,15 @@ pub fn new_null_array(data_type: &DataType, length:
usize) -> ArrayRef {
.clone(),
],
)),
- DataType::Struct(fields) => make_array(ArrayData::new(
- data_type.clone(),
- length,
- Some(length),
- Some(MutableBuffer::new_null(length).into()),
- 0,
- vec![],
- fields
+ DataType::Struct(fields) => {
+ let fields: Vec<_> = fields
.iter()
- .map(|field| ArrayData::new_empty(field.data_type()))
- .collect(),
- )),
+ .map(|field| (field.clone(), new_null_array(field.data_type(),
length)))
Review comment:
@nevi-me is the expert here. I believe the nullability is passed from
parent to child so your assumption is correct
--
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]