alamb commented on a change in pull request #822:
URL: https://github.com/apache/arrow-rs/pull/822#discussion_r725614308
##########
File path: arrow/benches/array_from_vec.rs
##########
@@ -31,9 +31,11 @@ fn array_from_vec(n: usize) {
for i in 0..n {
v.push((i & 0xffff) as u8);
}
- let arr_data = ArrayDataBuilder::new(DataType::Int32)
- .add_buffer(Buffer::from(v))
- .build();
+ let arr_data = unsafe {
Review comment:
It might be helpful to note that this is (very old) benchmark crate
seemingly last modified by @andygrove and @sunchao
https://github.com/apache/arrow-rs/blame/master/arrow/benches/array_from_vec.rs#L29-L38
To be honest it does not look safe to me. I will try and rewrite 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]