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

Checks if an array of type datatype can perform substring operation

Examples

use arrow2::compute::substring::can_substring;
use arrow2::datatypes::{DataType};

let data_type = DataType::Utf8;
assert_eq!(can_substring(&data_type), true);
let data_type = DataType::Null;
assert_eq!(can_substring(&data_type), false);