vortex_array/arrays/extension/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::ArrayRef;
7use crate::arrays::{ExtensionArray, ExtensionVTable};
8use crate::execution::{BatchKernelRef, BindCtx};
9use crate::vtable::OperatorVTable;
10
11impl OperatorVTable<ExtensionVTable> for ExtensionVTable {
12    fn bind(
13        array: &ExtensionArray,
14        selection: Option<&ArrayRef>,
15        ctx: &mut dyn BindCtx,
16    ) -> VortexResult<BatchKernelRef> {
17        // Since vectors are physically typed, extension array can delegate to its storage array
18        ctx.bind(&array.storage, selection)
19    }
20}