Module window

Module window 

Source
Expand description

§Window Functions Kernels Module - High-Performance Analytical Window Operations

Advanced window function kernels for sliding window computations, ranking operations, and positional analytics with SIMD acceleration and null-aware semantics. Backbone of time series analysis, analytical SQL window functions, and chunked streaming computations.

§Core Operations

  • Moving averages: Rolling mean calculations with configurable window sizes
  • Cumulative functions: Running sums, products, and statistical aggregations
  • Ranking functions: ROW_NUMBER, RANK, DENSE_RANK with tie-handling strategies
  • Lead/lag operations: Positional value access with configurable offsets
  • Percentile functions: Moving quantile calculations with interpolation support
  • Window aggregates: MIN, MAX, SUM operations over sliding windows

Constants§

W8
Auto-generated SIMD lane widths from build.rs SIMD lane count for 8-bit elements (u8, i8). Determined at build time based on target architecture capabilities, or overridden via SIMD_LANES_OVERRIDE.
W16
SIMD lane count for 16-bit elements (u16, i16). Determined at build time based on target architecture capabilities, or overridden via SIMD_LANES_OVERRIDE.
W32
SIMD lane count for 32-bit elements (u32, i32, f32). Determined at build time based on target architecture capabilities, or overridden via SIMD_LANES_OVERRIDE.
W64
SIMD lane count for 64-bit elements (u64, i64, f64). Determined at build time based on target architecture capabilities, or overridden via SIMD_LANES_OVERRIDE.

Functions§

dense_rank_float
Computes SQL DENSE_RANK() ranking for floating-point data with IEEE 754 compliance.
dense_rank_int
Computes SQL DENSE_RANK() ranking for integer data with consecutive rank assignment.
dense_rank_str
Computes SQL DENSE_RANK() ranking for string data with lexicographic dense ordering.
lag_float
Accesses values from previous positions in floating-point arrays with IEEE 754 compliance.
lag_int
Accesses values from previous positions in integer arrays with configurable offset.
lag_str
Accesses string values from previous positions with UTF-8 string handling.
lead_float
Accesses values from future positions in floating-point arrays with IEEE 754 compliance.
lead_int
Accesses values from future positions in integer arrays with configurable offset.
lead_str
Accesses string values from future positions with efficient UTF-8 processing.
rank_float
Computes standard SQL ROW_NUMBER() ranking for floating-point data with IEEE 754 compliance.
rank_int
Computes standard SQL ROW_NUMBER() ranking for integer data with tie handling.
rank_str
Computes standard SQL ROW_NUMBER() ranking for string data with lexicographic ordering.
rolling_count
Computes rolling counts of elements within sliding windows for positional analysis.
rolling_max_float
Computes rolling maximum values over floating-point data with IEEE 754 compliance.
rolling_max_int
Computes rolling maximum values over integer data within sliding windows.
rolling_mean_float
Computes rolling arithmetic means over floating-point data with IEEE 754 compliance.
rolling_mean_int
Computes rolling arithmetic means over integer data with high-precision floating-point output.
rolling_min_float
Computes rolling minimum values over floating-point data with IEEE 754 compliance.
rolling_min_int
For min, we skip that very first window slot so that the first non-zero result appears one step later. Computes rolling minimum values over integer data within sliding windows.
rolling_product_bool
Computes rolling logical AND operations over boolean data within sliding windows.
rolling_product_float
Computes rolling products over floating-point data with IEEE 754 mathematical semantics.
rolling_product_int
Computes rolling products over a sliding window for integer data with overflow protection.
rolling_sum_bool
Computes rolling sums over boolean data, counting true values within sliding windows.
rolling_sum_float
Computes rolling sums over a sliding window for floating-point data with IEEE 754 compliance.
rolling_sum_int
Computes rolling sums over a sliding window for integer data with null-aware semantics.
shift_float
Shifts floating-point array elements with IEEE 754 compliance and bidirectional support.
shift_int
Shifts integer array elements by specified offset with bidirectional support.
shift_str
Shifts string array elements with UTF-8 integrity and bidirectional offset support.