Expand description
Compute kernels on top of Vortex Arrays.
We aim to provide a basic set of compute kernels that can be used to efficiently index, slice, and filter Vortex Arrays in their encoded forms.
Every array encoding has the ability to implement their own efficient implementations of these operators, else we will decode, and perform the equivalent operator from Arrow.
Structs§
- Between
Kernel Adapter - Between
Kernel Ref - Between
Options - Binary
Args - For binary compute functions, it’s useful to just have this short-cut.
- Boolean
Kernel Adapter - Boolean
Kernel Ref - Cast
Kernel Adapter - Cast
Kernel Ref - Compare
Kernel Adapter - Compare
Kernel Ref - Compute
Fn - An instance of a compute function holding the implementation vtable and a set of registered compute kernels.
- Fill
Null Kernel Adapter - Fill
Null Kernel Ref - Filter
Kernel Adapter - Adapter to convert a
FilterKernel
into aKernel
. - Filter
Kernel Ref - A kernel that implements the filter function.
- Invert
Kernel Adapter - Invert
Kernel Ref - Invocation
Args - Arguments to a compute function invocation.
- IsConstant
Kernel Adapter - IsConstant
Kernel Ref - IsConstant
Opts - Configuration for
is_constant_opts
operations. - IsSorted
Kernel Adapter - IsSorted
Kernel Ref - Like
Kernel Adapter - Like
Kernel Ref - Like
Options - Options for SQL LIKE function
- Mask
Kernel Adapter - Mask
Kernel Ref - MinMax
- MinMax
Kernel Adapter - MinMax
Kernel Ref - MinMax
Result - NaNCount
Kernel Adapter - NaNCount
Kernel Ref - Numeric
Kernel Adapter - Numeric
Kernel Ref - SumKernel
Adapter - SumKernel
Ref - Take
- Take
From - Take
From Kernel Adapter - Take
From Kernel Ref - Take
Kernel Adapter - Take
Kernel Ref - A kernel that implements the filter function.
- Unary
Args - For unary compute functions, it’s useful to just have this short-cut.
Enums§
- Boolean
Operator - Cost
- When calling
is_constant
the children are all checked for constantness. This enum decide at each precision/cost level the constant check should run as. The cost increase as we move down the list. - Input
- Input to a compute function.
- Operator
- Output
- Output from a compute function.
- Strict
Comparison
Statics§
- BETWEEN_
FN - BOOLEAN_
FN - CAST_FN
- COMPARE_
FN - FILL_
NULL_ FN - FILTER_
FN - The filter
ComputeFn
. - INVERT_
FN - IS_
CONSTANT_ FN - IS_
SORTED_ FN - LIKE_FN
- MASK_FN
- MIN_
MAX_ FN - NAN_
COUNT_ FN - NUMERIC_
FN - SUM_FN
- TAKE_FN
- TAKE_
FROM_ FN
Traits§
- Between
Kernel - Boolean
Kernel - Cast
Kernel - Compare
Kernel - Compute
FnVTable - VTable for the implementation of a compute function.
- Fill
Null Kernel - Filter
Kernel - Invert
Kernel - IsConstant
Kernel - IsSorted
Iterator Ext - Helper methods to check sortedness with strictness
- IsSorted
Kernel - Kernel
- Compute functions can ask arrays for compute kernels for a given invocation.
- Like
Kernel - Mask
Kernel - MinMax
Kernel - Computes the min and max of an array, returning the (min, max) values
If the array is empty or has only nulls, the result is
None
. - NaNCount
Kernel - Computes the min and max of an array, returning the (min, max) values
- Numeric
Kernel - Options
- Options for a compute function invocation.
- SumKernel
- Take
From Kernel - Take
Kernel
Functions§
- add
- Point-wise add two numeric arrays.
- add_
scalar - Point-wise add a scalar value to this array on the right-hand-side.
- and
- Point-wise logical and between two Boolean arrays.
- and_
kleene - Point-wise Kleene logical and between two Boolean arrays.
- arrow_
filter_ fn - between
- Compute between (a <= x <= b), this can be implemented using compare and boolean and but this will likely have a lower runtime.
- boolean
- Point-wise logical operator between two Boolean arrays.
- cast
- Attempt to cast an array to a desired DType.
- compare
- Compares two arrays and returns a new boolean array with the result of the comparison. Or, returns None if comparison is not supported for these arrays.
- compare_
lengths_ to_ empty - Helper function to compare empty values with arrays that have external value length information
like
VarBin
. - div
- Point-wise divide two numeric arrays.
- div_
scalar - Point-wise divide a scalar value into this array on the right-hand-side.
- fill_
null - filter
- Keep only the elements for which the corresponding mask value is true.
- invert
- Logically invert a boolean array, preserving its validity.
- is_
constant - Computes whether an array has constant values. If the array’s encoding doesn’t implement the relevant VTable, it’ll try and canonicalize in order to make a determination.
- is_
constant_ opts - Computes whether an array has constant values. Configurable by
IsConstantOpts
. - is_
sorted - is_
sorted_ opts - is_
strict_ sorted - like
- Perform SQL left LIKE right
- list_
contains - Compute a
Bool
-typed array the same length asarray
where elements aretrue
if the list item contains thevalue
, orfalse
otherwise. - list_
elem_ len - Returns a new array of
u64
representing the length of each list element. - mask
- Replace values with null where the mask is true.
- min_max
- Computes the min & max of an array, returning the (min, max) values The return values are (min, max) scalars, where None indicates that the value is non-existent (e.g. for an empty array). The return value dtype is the non-nullable version of the array dtype.
- mul
- Point-wise multiply two numeric arrays.
- mul_
scalar - Point-wise multiply a scalar value into this array on the right-hand-side.
- nan_
count - Computes the number of NaN values in the array.
- numeric
- Point-wise numeric operation between two arrays of the same type and length.
- or
- Point-wise logical or between two Boolean arrays.
- or_
kleene - Point-wise Kleene logical or between two Boolean arrays.
- scalar_
cmp - sub
- Point-wise subtract two numeric arrays.
- sub_
scalar - Point-wise subtract a scalar value from this array on the right-hand-side.
- sum
- Sum an array.
- sum_
impl - Sum an array.
- take