Jefffrey commented on code in PR #10970:
URL: https://github.com/apache/arrow-rs/pull/10970#discussion_r3924172697


##########
arrow-data/src/data.rs:
##########
@@ -1544,7 +1544,8 @@ impl ArrayData {
             DataType::Struct(fields) => {
                 for (field, child) in fields.iter().zip(&self.child_data) {
                     if !field.is_nullable() {
-                        self.validate_non_nullable(self.nulls(), child)?
+                        let child = child.slice(self.offset, self.len);
+                        self.validate_non_nullable(self.nulls(), &child)?

Review Comment:
   i feel we can modify `validate_non_nullable` to take in the child nulls, 
which we can slice here, instead of slicing the entire child which clones it



-- 
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]

Reply via email to