Skip to content

Commit

Permalink
Update arrow-select/src/take.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Taylor-Davies <[email protected]>
  • Loading branch information
avantgardnerio and tustvold authored Oct 2, 2023
1 parent 25229e5 commit 0ef5425
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arrow-select/src/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ fn take_impl<IndexType: ArrowPrimitiveType>(
let mut field_type_ids = Vec::with_capacity(fields.len());
let mut children = Vec::with_capacity(fields.len());
let values = values.as_any().downcast_ref::<UnionArray>().unwrap();
let type_ids = Int8Array::try_new(values.type_ids().clone(), values.nulls().cloned())?;
let type_ids = take_impl(&type_ids, indices)?.to_data().buffer(0).into();
let type_ids = take_native(values.type_ids(), indices);
for (type_id, field) in fields.iter() {
let values = values.child(type_id);
let values = take_impl(values, indices)?;
Expand Down

0 comments on commit 0ef5425

Please sign in to comment.