vortex_array/arrays/primitive/compute/
mod.rs1use crate::arrays::{PrimitiveArray, PrimitiveEncoding};
2use crate::compute::{
3 BetweenFn, CastFn, FillForwardFn, FillNullFn, FilterKernelAdapter, IsConstantFn, IsSortedFn,
4 KernelRef, MaskFn, MinMaxFn, ScalarAtFn, SearchSortedFn, SearchSortedUsizeFn, SliceFn, SumFn,
5 TakeFn, ToArrowFn, UncompressedSizeFn,
6};
7use crate::vtable::ComputeVTable;
8use crate::{Array, ArrayComputeImpl};
9
10mod between;
11mod cast;
12mod fill;
13mod fill_null;
14mod filter;
15mod is_constant;
16mod is_sorted;
17mod mask;
18mod min_max;
19mod scalar_at;
20mod search_sorted;
21mod slice;
22mod sum;
23mod take;
24mod to_arrow;
25mod uncompressed_size;
26
27impl ArrayComputeImpl for PrimitiveArray {
28 const FILTER: Option<KernelRef> = FilterKernelAdapter(PrimitiveEncoding).some();
29}
30
31impl ComputeVTable for PrimitiveEncoding {
32 fn cast_fn(&self) -> Option<&dyn CastFn<&dyn Array>> {
33 Some(self)
34 }
35
36 fn between_fn(&self) -> Option<&dyn BetweenFn<&dyn Array>> {
37 Some(self)
38 }
39
40 fn fill_forward_fn(&self) -> Option<&dyn FillForwardFn<&dyn Array>> {
41 Some(self)
42 }
43
44 fn fill_null_fn(&self) -> Option<&dyn FillNullFn<&dyn Array>> {
45 Some(self)
46 }
47
48 fn is_constant_fn(&self) -> Option<&dyn IsConstantFn<&dyn Array>> {
49 Some(self)
50 }
51
52 fn is_sorted_fn(&self) -> Option<&dyn IsSortedFn<&dyn Array>> {
53 Some(self)
54 }
55
56 fn mask_fn(&self) -> Option<&dyn MaskFn<&dyn Array>> {
57 Some(self)
58 }
59
60 fn scalar_at_fn(&self) -> Option<&dyn ScalarAtFn<&dyn Array>> {
61 Some(self)
62 }
63
64 fn search_sorted_fn(&self) -> Option<&dyn SearchSortedFn<&dyn Array>> {
65 Some(self)
66 }
67
68 fn search_sorted_usize_fn(&self) -> Option<&dyn SearchSortedUsizeFn<&dyn Array>> {
69 Some(self)
70 }
71
72 fn slice_fn(&self) -> Option<&dyn SliceFn<&dyn Array>> {
73 Some(self)
74 }
75
76 fn sum_fn(&self) -> Option<&dyn SumFn<&dyn Array>> {
77 Some(self)
78 }
79
80 fn take_fn(&self) -> Option<&dyn TakeFn<&dyn Array>> {
81 Some(self)
82 }
83
84 fn to_arrow_fn(&self) -> Option<&dyn ToArrowFn<&dyn Array>> {
85 Some(self)
86 }
87
88 fn min_max_fn(&self) -> Option<&dyn MinMaxFn<&dyn Array>> {
89 Some(self)
90 }
91
92 fn uncompressed_size_fn(&self) -> Option<&dyn UncompressedSizeFn<&dyn Array>> {
93 Some(self)
94 }
95}