Skip to main content

Module text_array_view

Module text_array_view 

Source
Expand description

§TextArrayView Module - Windowed View over a TextArray

TextArrayV is a read-only, zero-copy view into a [offset .. offset + len) slice of a TextArray.

§Purpose

  • Provides windowed access to UTF-8 string data without copying buffers.
  • Unifies handling for StringArray and CategoricalArray under the TextArray enum.
  • Allows null counts to be cached per view for faster repeated operations.

§Behaviour

  • Fully supports both string and dictionary-encoded text variants.
  • Enables lightweight sub-ranges for use in downstream computations, filtering, or previews.
  • Creating a view does not allocate; slicing is zero-copy.

§Threading

  • Not thread-safe due to Cell for cached null counts.
  • For multi-threaded code, create per-thread clones via slice.

§Interop

§Invariants

  • offset + len <= array.len()
  • len is the logical number of text elements in the view.

Structs§

TextArrayV
TextArrayView