use std::ops::Range;
use vortex_array::ArrayRef;
use vortex_array::IntoArray;
use vortex_array::arrays::slice::SliceReduce;
use vortex_array::vtable::ValidityHelper;
use vortex_error::VortexResult;
use crate::ByteBool;
use crate::ByteBoolArray;
impl SliceReduce for ByteBool {
fn slice(array: &ByteBoolArray, range: Range<usize>) -> VortexResult<Option<ArrayRef>> {
Ok(Some(
ByteBoolArray::new(
array.buffer().slice(range.clone()),
array.validity().slice(range)?,
)
.into_array(),
))
}
}