yordan-pavlov commented on a change in pull request #9588: URL: https://github.com/apache/arrow/pull/9588#discussion_r584316571
########## 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: you are right @jorgecarleitao, it is up to the iterator reader to ensure incorrectly declared bounds do not result in incorrect behavior and, sadly the current implementation could write out of allocated memory in the case of an iterator that produces more items than the declared upper bound; but although I agree this should be fixed, I think it falls outside of the scope of this PR. ---------------------------------------------------------------- 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: us...@infra.apache.org