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

Checks if an array of type datatype can be used in hash.

Examples

use arrow2::compute::hash::can_hash;
use arrow2::datatypes::{DataType};

let data_type = DataType::Int8;
assert_eq!(can_hash(&data_type), true);
let data_type = DataType::Null;
assert_eq!(can_hash(&data_type), false);