vortex_array/vtable/
array.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use std::hash::Hasher;
5
6use vortex_dtype::DType;
7
8use crate::Precision;
9use crate::stats::StatsSetRef;
10use crate::vtable::VTable;
11
12// FIXME(ngates): inline into VTable when possible
13pub trait BaseArrayVTable<V: VTable> {
14    fn len(array: &V::Array) -> usize;
15
16    fn dtype(array: &V::Array) -> &DType;
17
18    fn stats(array: &V::Array) -> StatsSetRef<'_>;
19
20    fn array_hash<H: Hasher>(array: &V::Array, state: &mut H, precision: Precision);
21
22    fn array_eq(array: &V::Array, other: &V::Array, precision: Precision) -> bool;
23}