Skip to content

Commit 3b978bc

Browse files
authored
Remove compute vtable (#3250)
1 parent 233ae83 commit 3b978bc

File tree

27 files changed

+4
-106
lines changed

27 files changed

+4
-106
lines changed

encodings/alp/src/alp/compute/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ mod compare;
33
mod nan_count;
44

55
use vortex_array::compute::{TakeKernel, TakeKernelAdapter, take};
6-
use vortex_array::vtable::ComputeVTable;
76
use vortex_array::{Array, ArrayRef, register_kernel};
87
use vortex_error::VortexResult;
98

109
use crate::{ALPArray, ALPEncoding};
1110

12-
impl ComputeVTable for ALPEncoding {}
13-
1411
impl TakeKernel for ALPEncoding {
1512
fn take(&self, array: &ALPArray, indices: &dyn Array) -> VortexResult<ArrayRef> {
1613
let taken_encoded = take(array.encoded(), indices)?;
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
use vortex_array::vtable::ComputeVTable;
2-
3-
use crate::ALPRDEncoding;
4-
51
mod filter;
62
mod mask;
73
mod take;
8-
9-
impl ComputeVTable for ALPRDEncoding {}

encodings/bytebool/src/compute.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
use num_traits::AsPrimitive;
22
use vortex_array::compute::{MaskKernel, MaskKernelAdapter, TakeKernel, TakeKernelAdapter};
33
use vortex_array::variants::PrimitiveArrayTrait;
4-
use vortex_array::vtable::ComputeVTable;
54
use vortex_array::{Array, ArrayRef, ToCanonical, register_kernel};
65
use vortex_dtype::match_each_integer_ptype;
76
use vortex_error::VortexResult;
87
use vortex_mask::Mask;
98

109
use super::{ByteBoolArray, ByteBoolEncoding};
1110

12-
impl ComputeVTable for ByteBoolEncoding {}
13-
1411
impl MaskKernel for ByteBoolEncoding {
1512
fn mask(&self, array: &ByteBoolArray, mask: &Mask) -> VortexResult<ArrayRef> {
1613
Ok(ByteBoolArray::new(array.buffer().clone(), array.validity().mask(mask)?).into_array())

encodings/datetime-parts/src/compute/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@ mod compare;
33
mod filter;
44
mod is_constant;
55
mod take;
6-
7-
use vortex_array::vtable::ComputeVTable;
8-
9-
use crate::DateTimePartsEncoding;
10-
11-
impl ComputeVTable for DateTimePartsEncoding {}

encodings/dict/src/compute/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ mod min_max;
99
use vortex_array::compute::{
1010
FilterKernel, FilterKernelAdapter, TakeKernel, TakeKernelAdapter, filter, take,
1111
};
12-
use vortex_array::vtable::ComputeVTable;
1312
use vortex_array::{Array, ArrayRef, register_kernel};
1413
use vortex_error::VortexResult;
1514
use vortex_mask::Mask;
1615

1716
use crate::{DictArray, DictEncoding};
1817

19-
impl ComputeVTable for DictEncoding {}
20-
2118
impl TakeKernel for DictEncoding {
2219
fn take(&self, array: &DictArray, indices: &dyn Array) -> VortexResult<ArrayRef> {
2320
let codes = take(array.codes(), indices)?;

encodings/fastlanes/src/bitpacking/compute/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
use vortex_array::vtable::ComputeVTable;
2-
3-
use crate::BitPackedEncoding;
4-
51
mod between;
62
mod filter;
73
mod is_constant;
84
mod take;
95

10-
impl ComputeVTable for BitPackedEncoding {}
11-
126
fn chunked_indices<F: FnMut(usize, &[usize])>(
137
mut indices: impl Iterator<Item = usize>,
148
offset: usize,

encodings/fastlanes/src/delta/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use vortex_array::arrays::PrimitiveArray;
55
use vortex_array::stats::{ArrayStats, StatsSetRef};
66
use vortex_array::validity::Validity;
77
use vortex_array::variants::PrimitiveArrayTrait;
8-
use vortex_array::vtable::{ComputeVTable, VTableRef};
8+
use vortex_array::vtable::VTableRef;
99
use vortex_array::{
1010
Array, ArrayCanonicalImpl, ArrayImpl, ArrayRef, ArrayStatisticsImpl, ArrayValidityImpl,
1111
ArrayVariantsImpl, Canonical, Encoding, ProstMetadata,
@@ -278,5 +278,3 @@ impl ArrayVariantsImpl for DeltaArray {
278278
}
279279

280280
impl PrimitiveArrayTrait for DeltaArray {}
281-
282-
impl ComputeVTable for DeltaEncoding {}

encodings/fastlanes/src/for/compute/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ mod is_constant;
44
use vortex_array::compute::{
55
FilterKernel, FilterKernelAdapter, TakeKernel, TakeKernelAdapter, filter, take,
66
};
7-
use vortex_array::vtable::ComputeVTable;
87
use vortex_array::{Array, ArrayRef, register_kernel};
98
use vortex_error::VortexResult;
109
use vortex_mask::Mask;
1110

1211
use crate::{FoRArray, FoREncoding};
1312

14-
impl ComputeVTable for FoREncoding {}
15-
1613
impl TakeKernel for FoREncoding {
1714
fn take(&self, array: &FoRArray, indices: &dyn Array) -> VortexResult<ArrayRef> {
1815
FoRArray::try_new(

encodings/fsst/src/compute/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ mod filter;
33

44
use vortex_array::arrays::VarBinArray;
55
use vortex_array::compute::{TakeKernel, TakeKernelAdapter, fill_null, take};
6-
use vortex_array::vtable::ComputeVTable;
76
use vortex_array::{Array, ArrayExt, ArrayRef, register_kernel};
87
use vortex_error::VortexResult;
98
use vortex_scalar::{Scalar, ScalarValue};
109

1110
use crate::{FSSTArray, FSSTEncoding};
1211

13-
impl ComputeVTable for FSSTEncoding {}
14-
1512
impl TakeKernel for FSSTEncoding {
1613
// Take on an FSSTArray is a simple take on the codes array.
1714
fn take(&self, array: &FSSTArray, indices: &dyn Array) -> VortexResult<ArrayRef> {

encodings/runend/src/compute/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ mod min_max;
88
pub(crate) mod take;
99
mod take_from;
1010

11-
use vortex_array::vtable::ComputeVTable;
12-
13-
use crate::RunEndEncoding;
14-
15-
impl ComputeVTable for RunEndEncoding {}
16-
1711
#[cfg(test)]
1812
mod test {
1913
use vortex_array::Array;

0 commit comments

Comments
 (0)