Skip to main content

extract_column_string

Function extract_column_string 

Source
pub fn extract_column_string<'a>(
    cols: &'a [ArrayRef],
    column_key: &'static str,
    column_index: usize,
) -> Result<StringColumnRef<'a>, EncodingError>
Expand description

Extracts a string column, accepting both Utf8 (StringArray) and Utf8View (StringViewArray). Parquet may return Utf8View when reading, so this handles both formats.

ยงErrors

Returns an error if:

  • column_index is out of range: EncodingError::MissingColumn.
  • The column type is neither Utf8 nor Utf8View: EncodingError::InvalidColumnType.