yordan-pavlov commented on a change in pull request #9588:
URL: https://github.com/apache/arrow/pull/9588#discussion_r584292408
##########
File path: rust/arrow/src/array/array_binary.rs
##########
@@ -258,6 +258,8 @@ where
}
}
+ // calculate actual data_len, which may be different from the
iterator's upper bound
+ let data_len = offsets.len() - 1;
Review comment:
writing beyond the allocated capacity would only happen if the iterator
input returns more items than the declared upper bound - this would be against
the `Iterator` spec and I think that would be unlikely ;
this PR addresses the opposite case where an iterator returns less items
than its declared upper bound (which is still within the `Iterator` spec);
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]