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

Checks if an array of type datatype can perform year operation

Examples

use arrow2::compute::temporal::can_year;
use arrow2::datatypes::{DataType};

assert_eq!(can_year(&DataType::Date32), true);
assert_eq!(can_year(&DataType::Int8), false);