Jefffrey commented on code in PR #10945:
URL: https://github.com/apache/arrow-rs/pull/10945#discussion_r4080859931
##########
arrow-select/src/take.rs:
##########
@@ -961,10 +974,10 @@ where
if prev < vidx {
dst_offsets.extend(std::iter::repeat_n(child_len, vidx
- prev));
}
- let row = if CHECKED {
+ let row = if VALIDATE_INDICES {
Review Comment:
is the usage of validate indices correct here? similar to what i pointed out
in a previous PR, but it should be about using the index from indices (in this
case on `src_offsets`) and not about getting from indices 🤔
##########
arrow-select/src/take.rs:
##########
@@ -1031,10 +1044,10 @@ where
if last < i {
dst_offsets.extend(std::iter::repeat_n(current, i - last));
}
- let row = if CHECKED {
+ let row = if VALIDATE_INDICES {
indices.value(i).as_usize()
} else {
- // SAFETY: !CHECKED means the caller guarantees all
indices are valid;
+ // SAFETY: !VALIDATE_INDICES means the caller guarantees
all indices are valid;
// `i` is further bounded by the validity bitmap of
`indices`.
unsafe { indices.value_unchecked(i) }.as_usize()
Review Comment:
same here
--
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]