Skip to main content

extract_column_by_name_or_index

Function extract_column_by_name_or_index 

Source
pub fn extract_column_by_name_or_index<'a, T: Array + 'static>(
    record_batch: &'a RecordBatch,
    column_key: &'static str,
    fallback_index: usize,
    expected_type: DataType,
) -> Result<&'a T, EncodingError>
Expand description

Extracts a column by name when present, falling back to an index for older schemas.

ยงErrors

Returns an error if the resolved column is missing or has the wrong type.