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

Checks if an array of type datatype can perform length operation

Examples

use arrow2::compute::length::can_length;
use arrow2::datatypes::{DataType};

let data_type = DataType::Utf8;
assert_eq!(can_length(&data_type), true);

let data_type = DataType::Int8;
assert_eq!(can_length(&data_type), false);