Skip to main content

concat_dict_dict

Function concat_dict_dict 

Source
pub fn concat_dict_dict<T: Integer>(
    lhs: CategoricalAVT<'_, T>,
    rhs: CategoricalAVT<'_, T>,
) -> Result<CategoricalArray<T>, KernelError>
Expand description

Concatenates corresponding string pairs from two categorical arrays element-wise.

Performs element-wise concatenation by looking up dictionary values from both categorical arrays and concatenating the resolved strings. Creates a new string array with the concatenated results.

§Parameters

  • lhs: Left-hand categorical array view tuple (CategoricalArray, offset, length)
  • rhs: Right-hand categorical array view tuple (CategoricalArray, offset, length)

§Returns

A new StringArray<T> containing concatenated dictionary strings.

§Null Handling

  • If either categorical value is null, the result is null
  • Output null mask reflects the union of input null positions

§Implementation

  • Dictionary lookups resolve categorical codes to actual strings
  • Memory allocation optimised based on total concatenated length