vortex_array/vtable/operator.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use vortex_error::VortexResult;
5
6use crate::operator::OperatorRef;
7use crate::vtable::{NotSupported, VTable};
8
9pub trait PipelineVTable<V: VTable> {
10 /// Convert the current array into a [`OperatorRef`].
11 /// Returns `None` if the array cannot be converted to an operator.
12 fn to_operator(array: &V::Array) -> VortexResult<Option<OperatorRef>>;
13}
14
15impl<V: VTable> PipelineVTable<V> for NotSupported {
16 fn to_operator(_array: &V::Array) -> VortexResult<Option<OperatorRef>> {
17 Ok(None)
18 }
19}