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
12pub trait ArrayVTable<V: VTable> {
13    fn len(array: &V::Array) -> usize;
14
15    fn dtype(array: &V::Array) -> &DType;
16
17    fn stats(array: &V::Array) -> StatsSetRef<'_>;
18
19    fn array_hash<H: Hasher>(array: &V::Array, state: &mut H, precision: Precision);
20
21    fn array_eq(array: &V::Array, other: &V::Array, precision: Precision) -> bool;
22}