jackwener commented on a change in pull request #1420:
URL: https://github.com/apache/arrow-rs/pull/1420#discussion_r824369335
##########
File path: arrow/src/array/array_binary.rs
##########
@@ -473,6 +473,18 @@ impl FixedSizeBinaryArray {
}
}
+ /// Returns the element at index `i` as a byte slice.
+ /// # Safety
+ /// Caller is responsible for ensuring that the index is within the bounds
of the array
+ pub unsafe fn value_unchecked(&self, i: usize) -> &[u8] {
+ let offset = i.checked_add(self.data.offset()).unwrap();
Review comment:
Only two are the same and duplication is little, eliminating duplication
should not be necessary.
BTW, it is same with other `_unchecked`.
--
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]