Dandandan commented on code in PR #7457: URL: https://github.com/apache/arrow-rs/pull/7457#discussion_r2069974348
########## arrow-array/src/array/primitive_array.rs: ########## @@ -1035,12 +1028,9 @@ impl<T: ArrowPrimitiveType> PrimitiveArray<T> { F: FnMut(U::Item) -> T::Native, { let nulls = left.logical_nulls(); - let buffer = unsafe { - // SAFETY: i in range 0..left.len() - let iter = (0..left.len()).map(|i| op(left.value_unchecked(i))); - // SAFETY: upper bound is trusted because `iter` is over a range - Buffer::from_trusted_len_iter(iter) - }; + let buffer: Vec<_> = (0..left.len()) + .map(|i| op(unsafe { left.value_unchecked(i) })) Review Comment: Yeah, added back -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org