pub fn sequence_encode(
primitive_array: &PrimitiveArray,
) -> VortexResult<Option<ArrayRef>>
Expand description
Encodes a primitive array into a sequence array, this is possible if:
- The array is not empty, and contains no nulls
- The array is not a float array. (This is due to precision issues, how it will stack well with ALP).
- The array is representable as a sequence
A[i] = base + i * multiplier
for multiplier != 0. - The sequence has no deviations from the equation, this could be fixed with patches. However, we might want a different array for that since sequence provide fast access.