Skip to content

Commit ff299eb

Browse files
authored
Chore: Add no-op IsSorted and MinMax compute kernels for FixedSizeListVTable (#4601)
Tracking Issue: #4372 This follows the list implementation that is also a no-op (is no-op the right word here?) Signed-off-by: Connor Tsui <[email protected]>
1 parent c7f959a commit ff299eb

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3+
4+
use vortex_error::VortexResult;
5+
6+
use crate::arrays::{FixedSizeListArray, FixedSizeListVTable};
7+
use crate::compute::{IsSortedKernel, IsSortedKernelAdapter};
8+
use crate::register_kernel;
9+
10+
// TODO(connor): Right now this does nothing.
11+
/// IsSorted implementation for [`FixedSizeListArray`].
12+
impl IsSortedKernel for FixedSizeListVTable {
13+
fn is_sorted(&self, _array: &FixedSizeListArray) -> VortexResult<Option<bool>> {
14+
Ok(None)
15+
}
16+
17+
fn is_strict_sorted(&self, _array: &FixedSizeListArray) -> VortexResult<Option<bool>> {
18+
Ok(None)
19+
}
20+
}
21+
22+
register_kernel!(IsSortedKernelAdapter(FixedSizeListVTable).lift());
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3+
4+
use vortex_error::VortexResult;
5+
6+
use crate::arrays::{FixedSizeListArray, FixedSizeListVTable};
7+
use crate::compute::{MinMaxKernel, MinMaxKernelAdapter, MinMaxResult};
8+
use crate::register_kernel;
9+
10+
// TODO(connor): Right now this does nothing.
11+
/// MinMax implementation for [`FixedSizeListArray`].
12+
impl MinMaxKernel for FixedSizeListVTable {
13+
fn min_max(&self, _array: &FixedSizeListArray) -> VortexResult<Option<MinMaxResult>> {
14+
Ok(None)
15+
}
16+
}
17+
18+
register_kernel!(MinMaxKernelAdapter(FixedSizeListVTable).lift());

‎vortex-array/src/arrays/fixed_size_list/compute/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
mod cast;
55
mod filter;
66
mod is_constant;
7+
mod is_sorted;
78
mod mask;
9+
mod min_max;
810
mod take;

0 commit comments

Comments
 (0)