Function polars_arrow::compute::temporal::can_hour
source · pub fn can_hour(data_type: &ArrowDataType) -> bool
Available on crate feature
compute_temporal
only.Expand description
Checks if an array of type datatype
can perform hour operation
§Examples
use polars_arrow::compute::temporal::can_hour;
use polars_arrow::datatypes::{ArrowDataType, TimeUnit};
assert_eq!(can_hour(&ArrowDataType::Time32(TimeUnit::Second)), true);
assert_eq!(can_hour(&ArrowDataType::Int8), false);