Skip to content

Commit

Permalink
handle i64::MIN first
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiayu Liu committed Jun 3, 2021
1 parent e63440f commit 20c4a74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arrow/src/compute/kernels/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
let value_len = values.len() as i64;
if offset == 0 {
Ok(values.slice(0, values.len()))
} else if abs(offset) >= value_len || offset == i64::MIN {
} else if offset == i64::MIN || abs(offset) >= value_len {
Ok(new_null_array(&T::DATA_TYPE, values.len()))
} else {
let slice_offset = clamp(-offset, 0, value_len) as usize;
Expand Down

0 comments on commit 20c4a74

Please sign in to comment.