Skip to main content

union_extract_by_id

Function union_extract_by_id 

pub fn union_extract_by_id(
    union_array: &UnionArray,
    target_type_id: i8,
) -> Result<Arc<dyn Array>, ArrowError>
Expand description

Like union_extract, but selects the child by type_id rather than by field name.

This avoids ambiguity when the union contains duplicate field names.

ยงErrors

Returns error if target_type_id does not correspond to a field in the union.