vortex_array/arrays/extension/compute/
is_constant.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use vortex_error::VortexResult;
5
6use crate::arrays::{ExtensionArray, ExtensionVTable};
7use crate::compute::{self, IsConstantKernel, IsConstantKernelAdapter, IsConstantOpts};
8use crate::register_kernel;
9
10impl IsConstantKernel for ExtensionVTable {
11    fn is_constant(
12        &self,
13        array: &ExtensionArray,
14        opts: &IsConstantOpts,
15    ) -> VortexResult<Option<bool>> {
16        compute::is_constant_opts(array.storage(), opts)
17    }
18}
19
20register_kernel!(IsConstantKernelAdapter(ExtensionVTable).lift());