vortex_runend/compute/
is_sorted.rs1use vortex_array::compute::IsSortedKernel;
5use vortex_array::compute::IsSortedKernelAdapter;
6use vortex_array::compute::is_sorted;
7use vortex_array::compute::is_strict_sorted;
8use vortex_array::register_kernel;
9use vortex_error::VortexResult;
10
11use crate::RunEndArray;
12use crate::RunEndVTable;
13
14impl IsSortedKernel for RunEndVTable {
15 fn is_sorted(&self, array: &RunEndArray) -> VortexResult<Option<bool>> {
16 is_sorted(array.values())
17 }
18
19 fn is_strict_sorted(&self, array: &RunEndArray) -> VortexResult<Option<bool>> {
20 is_strict_sorted(array.to_canonical().as_ref())
21 }
22}
23
24register_kernel!(IsSortedKernelAdapter(RunEndVTable).lift());