You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/09 05:23:40 UTC
[GitHub] [arrow-rs] Dandandan commented on a change in pull request #422: disable lexsort bound check
Dandandan commented on a change in pull request #422:
URL: https://github.com/apache/arrow-rs/pull/422#discussion_r647975096
##########
File path: arrow/src/compute/kernels/sort.rs
##########
@@ -805,7 +806,17 @@ pub fn lexsort(columns: &[SortColumn], limit: Option<usize>) -> Result<Vec<Array
let indices = lexsort_to_indices(columns, limit)?;
columns
.iter()
- .map(|c| take(c.values.as_ref(), &indices, None))
+ .map(|c| {
+ take(
+ c.values.as_ref(),
+ &indices,
+ // disable bound check overhead since indices are already generated from
+ // the same record batch
+ Some(TakeOptions {
Review comment:
The `Default` of `TakeOptions` is already `checkbounds: false`, so this does the same.
https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/take.rs#L262
It does do *some* bound checking in the inner loop (as otherwise the method would be unsafe).
--
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:
users@infra.apache.org