Path: blob/main/crates/polars-compute/src/comparisons/utf8.rs
6939 views
use arrow::array::Utf8Array;1use arrow::bitmap::Bitmap;2use arrow::types::Offset;34use super::{TotalEqKernel, TotalOrdKernel};56impl<O: Offset> TotalEqKernel for Utf8Array<O> {7type Scalar = str;89fn tot_eq_kernel(&self, other: &Self) -> Bitmap {10self.to_binary().tot_eq_kernel(&other.to_binary())11}1213fn tot_ne_kernel(&self, other: &Self) -> Bitmap {14self.to_binary().tot_ne_kernel(&other.to_binary())15}1617fn tot_eq_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {18self.to_binary().tot_eq_kernel_broadcast(other.as_bytes())19}2021fn tot_ne_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {22self.to_binary().tot_ne_kernel_broadcast(other.as_bytes())23}24}2526impl<O: Offset> TotalOrdKernel for Utf8Array<O> {27type Scalar = str;2829fn tot_lt_kernel(&self, other: &Self) -> Bitmap {30self.to_binary().tot_lt_kernel(&other.to_binary())31}3233fn tot_le_kernel(&self, other: &Self) -> Bitmap {34self.to_binary().tot_le_kernel(&other.to_binary())35}3637fn tot_lt_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {38self.to_binary().tot_lt_kernel_broadcast(other.as_bytes())39}4041fn tot_le_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {42self.to_binary().tot_le_kernel_broadcast(other.as_bytes())43}4445fn tot_gt_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {46self.to_binary().tot_gt_kernel_broadcast(other.as_bytes())47}4849fn tot_ge_kernel_broadcast(&self, other: &Self::Scalar) -> Bitmap {50self.to_binary().tot_ge_kernel_broadcast(other.as_bytes())51}52}535455