We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56fefbc commit 7d95d8cCopy full SHA for 7d95d8c
arrow/src/compute/kernels/window.rs
@@ -18,7 +18,7 @@
18
//! Defines windowing functions, like `shift`ing
19
20
use crate::array::{Array, ArrayRef};
21
-use crate::{array::PrimitiveArray, datatypes::ArrowPrimitiveType, error::Result};
+use crate::error::Result;
22
use crate::{
23
array::{make_array, new_null_array},
24
compute::concat,
@@ -59,7 +59,7 @@ use num::{abs, clamp};
59
pub fn shift(array: &Array, offset: i64) -> Result<ArrayRef> {
60
let value_len = array.len() as i64;
61
if offset == 0 {
62
- Ok(make_array(values.data_ref().clone()))
+ Ok(make_array(array.data_ref().clone()))
63
} else if offset == i64::MIN || abs(offset) >= value_len {
64
Ok(new_null_array(array.data_type(), array.len()))
65
} else {
0 commit comments