Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-isaacs committed Nov 25, 2024
1 parent 55101eb commit 153b186
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions datafusion/functions/src/datetime/date_bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ mod tests {

use crate::datetime::date_bin::{date_bin_nanos_interval, DateBinFunc};
use arrow::array::types::TimestampNanosecondType;
use arrow::array::{Array, IntervalDayTimeArray, TimestampNanosecondArray};
use arrow::array::{Array, ArrayRef, IntervalDayTimeArray, TimestampNanosecondArray};
use arrow::compute::kernels::cast_utils::string_to_timestamp_nanos;
use arrow::datatypes::{DataType, TimeUnit};

Expand Down Expand Up @@ -537,6 +537,7 @@ mod tests {
assert!(res.is_ok());

let timestamps = Arc::new((1..6).map(Some).collect::<TimestampNanosecondArray>());
let batch_len = timestamps.len();
let res = DateBinFunc::new().invoke_batch(
&[
ColumnarValue::Scalar(ScalarValue::IntervalDayTime(Some(
Expand All @@ -545,10 +546,10 @@ mod tests {
milliseconds: 1,
},
))),
ColumnarValue::Array(timestamps.clone()),
ColumnarValue::Array(timestamps),
ColumnarValue::Scalar(ScalarValue::TimestampNanosecond(Some(1), None)),
],
timestamps.len(),
batch_len,
);
assert!(res.is_ok());

Expand Down

0 comments on commit 153b186

Please sign in to comment.