Function extract_column

Source
pub fn extract_column<'a, T: Array + 'static>(
    cols: &'a [ArrayRef],
    column_key: &'static str,
    column_index: usize,
    expected_type: DataType,
) -> Result<&'a T, EncodingError>
Expand description

Extracts and downcasts the specified column_key column from an Arrow array slice.

§Errors

Returns an error if:

  • column_index is out of range: EncodingError::MissingColumn.
  • The column type does not match expected_type: EncodingError::InvalidColumnType.