GregBowyer commented on a change in pull request #8698:
URL: https://github.com/apache/arrow/pull/8698#discussion_r541459341
##########
File path: rust/parquet/src/data_type.rs
##########
@@ -327,7 +422,12 @@ pub trait AsBytes {
pub trait SliceAsBytes: Sized {
/// Returns slice of bytes for a slice of this data type.
fn slice_as_bytes(self_: &[Self]) -> &[u8];
- fn slice_as_bytes_mut(self_: &mut [Self]) -> &mut [u8];
+ /// Return the internal representation as a mutable slice
+ ///
+ /// # Safety
+ /// If modified you are _required_ to ensure the internal representation
+ /// is valid and correct for the actual raw data
+ unsafe fn slice_as_bytes_mut(self_: &mut [Self]) -> &mut [u8];
Review comment:
yes, I made this more obviously unsafe given its sneaky type breaking
nature, I wanted to highlight a bit more obviously what this was doing
----------------------------------------------------------------
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]