pub fn can_hour(data_type: &DataType) -> bool
Available on crate feature compute_temporal only.
Expand description

Checks if an array of type datatype can perform hour operation

Examples

use arrow2::compute::temporal::can_hour;
use arrow2::datatypes::{DataType, TimeUnit};

assert_eq!(can_hour(&DataType::Time32(TimeUnit::Second)), true);
assert_eq!(can_hour(&DataType::Int8), false);