tustvold commented on code in PR #2929:
URL: https://github.com/apache/arrow-rs/pull/2929#discussion_r1005140128
##########
arrow/src/compute/kernels/sort.rs:
##########
@@ -942,11 +949,8 @@ pub fn lexsort_to_indices(
lexicographical_comparator.compare(a, b)
});
- Ok(UInt32Array::from(
- (&value_indices)[0..len]
- .iter()
- .map(|i| *i as u32)
- .collect::<Vec<u32>>(),
+ Ok(UInt32Array::from_iter_values(
Review Comment:
Drive by cleanup to avoid an intermediate array
--
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]