pub fn can_compare(data_type: &DataType) -> bool {
    matches!(
        data_type,
        DataType::Boolean
            | DataType::Int8
            | DataType::Int16
            | DataType::Int32
            | DataType::Date32
            | DataType::Time32(_)
            | DataType::Interval(_)
            | DataType::Int64
            | DataType::Timestamp(_, None)
            | DataType::Date64
            | DataType::Time64(_)
            | DataType::Duration(_)
            | DataType::UInt8
            | DataType::UInt16
            | DataType::UInt32
            | DataType::UInt64
            | DataType::Float32
            | DataType::Float64
            | DataType::Utf8
            | DataType::LargeUtf8
            | DataType::Decimal(_, _)
    )
}
/// Checks if an array of type `datatype` can be compared with another array of
/// the same type.
///
/// # Examples
/// ```
/// use arrow2::compute::comparison::can_compare;
/// use arrow2::datatypes::{DataType};
///
/// let data_type = DataType::Int8;
/// assert_eq!(can_compare(&data_type), true);
///
/// let data_type = DataType::LargeBinary;
/// assert_eq!(can_compare(&data_type), false)
/// ```
Checks if an array of type `datatype` can be compared with another array of
the same type.
Checks if an array of type ` datatype ` can be compared with another array of the same type .
pub fn can_compare(data_type: &DataType) -> bool {
    matches!(
        data_type,
        DataType::Boolean
            | DataType::Int8
            | DataType::Int16
            | DataType::Int32
            | DataType::Date32
            | DataType::Time32(_)
            | DataType::Interval(_)
            | DataType::Int64
            | DataType::Timestamp(_, None)
            | DataType::Date64
            | DataType::Time64(_)
            | DataType::Duration(_)
            | DataType::UInt8
            | DataType::UInt16
            | DataType::UInt32
            | DataType::UInt64
            | DataType::Float32
            | DataType::Float64
            | DataType::Utf8
            | DataType::LargeUtf8
            | DataType::Decimal(_, _)
    )
}
pub fn can_compare ( data_type : & DataType ) -> bool { matches ! ( data_type DataType Boolean DataType Int8 DataType Int16 DataType Int32 DataType Date32 DataType Time32 ( ) DataType Interval ( ) DataType Int64 DataType Timestamp ( None ) DataType Date64 DataType Time64 ( ) DataType Duration ( ) DataType UInt8 DataType UInt16 DataType UInt32 DataType UInt64 DataType Float32 DataType Float64 DataType Utf8 DataType LargeUtf8 DataType Decimal ( ) ) }
Checks if an array of type `datatype` can be compared with another array of
the same type.
Checks if an array of type ` datatype ` can be compared with another array of the same type .
data_type
&DataType
examples
```
use arrow2::compute::comparison::can_compare;
use arrow2::datatypes::{DataType}.

let data_type = DataType::Int8;
assert_eq!(can_compare(&data_type), true).

let data_type = DataType::LargeBinary;
assert_eq!(can_compare(&data_type), false)
```
` ` ` use arrow2 :: compute :: comparison :: can_compare ; use arrow2 :: datatypes :: { DataType } . let data_type = DataType :: Int8 ; assert_eq! ( can_compare ( &data_type ) true ) . let data_type = DataType :: LargeBinary ; assert_eq! ( can_compare ( &data_type ) false ) ` ` `