mod bool;
use vortex_error::VortexResult;
use vortex_error::vortex_panic;
use super::Interleave;
use super::InterleaveArrayExt;
use crate::array::Array;
use crate::executor::ExecutionCtx;
use crate::executor::ExecutionResult;
pub(super) fn execute(
array: Array<Interleave>,
ctx: &mut ExecutionCtx,
) -> VortexResult<ExecutionResult> {
if array.value(0).dtype().is_boolean() {
bool::execute(array, ctx)
} else {
let value_dtype = array.value(0).dtype().clone();
vortex_panic!(
"interleave execution is only implemented for boolean values; value dtype {} is not \
yet supported",
value_dtype
)
}
}