Skip to content

Commit f139ef8

Browse files
authored
#1768 Support TimeUnit::Second in hasher (#1769)
* Support TimeUnit::Second in hasher * fix linter
1 parent 4f4153b commit f139ef8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

datafusion/src/physical_plan/hash_utils.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use arrow::array::{
2323
Array, ArrayRef, BooleanArray, Date32Array, Date64Array, DecimalArray,
2424
DictionaryArray, Float32Array, Float64Array, Int16Array, Int32Array, Int64Array,
2525
Int8Array, LargeStringArray, StringArray, TimestampMicrosecondArray,
26-
TimestampMillisecondArray, TimestampNanosecondArray, UInt16Array, UInt32Array,
27-
UInt64Array, UInt8Array,
26+
TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray,
27+
UInt16Array, UInt32Array, UInt64Array, UInt8Array,
2828
};
2929
use arrow::datatypes::{
3030
ArrowDictionaryKeyType, ArrowNativeType, DataType, Int16Type, Int32Type, Int64Type,
@@ -387,6 +387,16 @@ pub fn create_hashes<'a>(
387387
multi_col
388388
);
389389
}
390+
DataType::Timestamp(TimeUnit::Second, None) => {
391+
hash_array_primitive!(
392+
TimestampSecondArray,
393+
col,
394+
i64,
395+
hashes_buffer,
396+
random_state,
397+
multi_col
398+
);
399+
}
390400
DataType::Timestamp(TimeUnit::Millisecond, None) => {
391401
hash_array_primitive!(
392402
TimestampMillisecondArray,

0 commit comments

Comments
 (0)