vortex_runend/compute/is_sorted.rs
1use vortex_array::Array;
2use vortex_array::compute::{IsSortedFn, is_sorted, is_strict_sorted};
3
4use crate::{RunEndArray, RunEndEncoding};
5
6impl IsSortedFn<&RunEndArray> for RunEndEncoding {
7 fn is_sorted(&self, array: &RunEndArray) -> vortex_error::VortexResult<bool> {
8 is_sorted(array.values())
9 }
10
11 fn is_strict_sorted(&self, array: &RunEndArray) -> vortex_error::VortexResult<bool> {
12 is_strict_sorted(array.to_canonical()?.as_ref())
13 }
14}