Skip to content

Commit

Permalink
#1768 Support TimeUnit::Second in hasher (#1769)
Browse files Browse the repository at this point in the history
* Support TimeUnit::Second in hasher

* fix linter
  • Loading branch information
jychen7 authored Feb 7, 2022
1 parent 4f4153b commit f139ef8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions datafusion/src/physical_plan/hash_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use arrow::array::{
Array, ArrayRef, BooleanArray, Date32Array, Date64Array, DecimalArray,
DictionaryArray, Float32Array, Float64Array, Int16Array, Int32Array, Int64Array,
Int8Array, LargeStringArray, StringArray, TimestampMicrosecondArray,
TimestampMillisecondArray, TimestampNanosecondArray, UInt16Array, UInt32Array,
UInt64Array, UInt8Array,
TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray,
UInt16Array, UInt32Array, UInt64Array, UInt8Array,
};
use arrow::datatypes::{
ArrowDictionaryKeyType, ArrowNativeType, DataType, Int16Type, Int32Type, Int64Type,
Expand Down Expand Up @@ -387,6 +387,16 @@ pub fn create_hashes<'a>(
multi_col
);
}
DataType::Timestamp(TimeUnit::Second, None) => {
hash_array_primitive!(
TimestampSecondArray,
col,
i64,
hashes_buffer,
random_state,
multi_col
);
}
DataType::Timestamp(TimeUnit::Millisecond, None) => {
hash_array_primitive!(
TimestampMillisecondArray,
Expand Down

0 comments on commit f139ef8

Please sign in to comment.