Skip to main content

Module utils

Module utils 

Source
Expand description

§Utilities - Internal Helper Utilities

A small collection of internal utilities that support validation, parsing, and text conversion elsewhere within the crate.

Functions§

align64
Round byte_count up to the next 64-byte boundary.
confirm_capacity
Validates that actual capacity matches expected capacity for kernel operations.
confirm_equal_len
Validates that two lengths are equal for binary kernel operations.
confirm_mask_capacity
Checks the mask capacity is large enough Used so we can avoid bounds checks in the hot loop
create_aligned_chunks_from_array
Helper function to create aligned chunks from Array to match SuperArray chunk structure
estimate_categorical_cardinality
Estimate cardinality ratio on a sample from a CategoricalArray. Used to quickly figure out the optimal strategy when comparing StringArray and CategoricalArrays.
estimate_string_cardinality
Estimate cardinality ratio on a sample from a StringArray. Used to quickly figure out the optimal strategy when comparing StringArray and CategoricalArrays.
float_to_text_array
Converts a float array to a String32 TextArray, preserving nulls.
int_to_text_array
Converts an integer array to a String32 TextArray, preserving nulls.
is_simd_aligned
SIMD Alignment check. Returns true if the slice is properly 64-byte aligned for SIMD operations, false otherwise.
parse_datetime_str
Parses a string into a timestamp in milliseconds since the Unix epoch. Returns Some(i64) on success, or None if the string could not be parsed.
simd_mask
Creates a SIMD mask from a bitmask window for vectorised conditional operations.
validate_null_mask_len
write_simd_mask_bits
Writes a SIMD mask’s packed bits directly into the output bitmask at the given offset. This is the write-side complement to simd_mask, avoiding per-lane set_unchecked calls.