vortex_fastlanes/for/vtable/
slice.rs1use std::ops::Range;
5
6use vortex_array::ArrayRef;
7use vortex_array::IntoArray;
8use vortex_array::arrays::SliceReduce;
9use vortex_error::VortexResult;
10
11use crate::FoRArray;
12use crate::FoRVTable;
13
14impl SliceReduce for FoRVTable {
15 fn slice(array: &Self::Array, range: Range<usize>) -> VortexResult<Option<ArrayRef>> {
16 Ok(Some(unsafe {
18 FoRArray::new_unchecked(
19 array.encoded().slice(range)?,
20 array.reference_scalar().clone(),
21 )
22 .into_array()
23 }))
24 }
25}