vortex_pco/slice.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use std::ops::Range;
5
6use vortex_array::ArrayRef;
7use vortex_array::IntoArray;
8use vortex_array::arrays::slice::SliceReduce;
9use vortex_error::VortexResult;
10
11use crate::Pco;
12
13impl SliceReduce for Pco {
14 fn slice(array: &Self::Array, range: Range<usize>) -> VortexResult<Option<ArrayRef>> {
15 Ok(Some(array._slice(range.start, range.end).into_array()))
16 }
17}