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
27pub use is_constant::*;
28
29impl ArrayComputeImpl for PrimitiveArray {
30 const FILTER: Option<KernelRef> = FilterKernelAdapter(PrimitiveEncoding).some();
31}
32
33impl ComputeVTable for PrimitiveEncoding {
34 fn between_fn(&self) -> Option<&dyn BetweenFn<&dyn Array>> {
35 Some(self)
36 }
37
38 fn cast_fn(&self) -> Option<&dyn CastFn<&dyn Array>> {
39 Some(self)
40 }
41
42 fn fill_forward_fn(&self) -> Option<&dyn FillForwardFn<&dyn Array>> {
43 Some(self)
44 }
45
46 fn fill_null_fn(&self) -> Option<&dyn FillNullFn<&dyn Array>> {
47 Some(self)
48 }
49
50 fn is_constant_fn(&self) -> Option<&dyn IsConstantFn<&dyn Array>> {
51 Some(self)
52 }
53
54 fn is_sorted_fn(&self) -> Option<&dyn IsSortedFn<&dyn Array>> {
55 Some(self)
56 }
57
58 fn mask_fn(&self) -> Option<&dyn MaskFn<&dyn Array>> {
59 Some(self)
60 }
61
62 fn min_max_fn(&self) -> Option<&dyn MinMaxFn<&dyn Array>> {
63 Some(self)
64 }
65
66 fn scalar_at_fn(&self) -> Option<&dyn ScalarAtFn<&dyn Array>> {
67 Some(self)
68 }
69
70 fn search_sorted_fn(&self) -> Option<&dyn SearchSortedFn<&dyn Array>> {
71 Some(self)
72 }
73
74 fn search_sorted_usize_fn(&self) -> Option<&dyn SearchSortedUsizeFn<&dyn Array>> {
75 Some(self)
76 }
77
78 fn slice_fn(&self) -> Option<&dyn SliceFn<&dyn Array>> {
79 Some(self)
80 }
81
82 fn sum_fn(&self) -> Option<&dyn SumFn<&dyn Array>> {
83 Some(self)
84 }
85
86 fn take_fn(&self) -> Option<&dyn TakeFn<&dyn Array>> {
87 Some(self)
88 }
89
90 fn to_arrow_fn(&self) -> Option<&dyn ToArrowFn<&dyn Array>> {
91 Some(self)
92 }
93
94 fn uncompressed_size_fn(&self) -> Option<&dyn UncompressedSizeFn<&dyn Array>> {
95 Some(self)
96 }
97}