@@ -26,13 +26,11 @@ use crate::arrays::list::ListArrayExt;
2626use crate :: arrays:: piecewise_sequence:: constant_unsigned_usize;
2727use crate :: arrays:: piecewise_sequence:: maybe_contiguous_slices;
2828use crate :: arrays:: primitive:: PrimitiveArrayExt ;
29- use crate :: builtins:: ArrayBuiltins ;
3029use crate :: dtype:: IntegerPType ;
3130use crate :: dtype:: UnsignedPType ;
3231use crate :: executor:: ExecutionCtx ;
3332use crate :: match_each_unsigned_integer_ptype;
3433use crate :: match_smallest_offset_type;
35- use crate :: scalar:: Scalar ;
3634use crate :: validity:: Validity ;
3735
3836// TODO(connor)[ListView]: Re-revert to the version where we simply convert to a `ListView` and call
@@ -57,11 +55,7 @@ impl TakeExecute for List {
5755 }
5856
5957 let new_validity = array. validity ( ) ?. take ( indices) ?;
60- let normalized_indices = indices
61- . clone ( )
62- . mask ( new_validity. to_array ( indices. len ( ) ) ) ?
63- . fill_null ( Scalar :: from ( 0 ) . cast ( indices. dtype ( ) ) ?) ?;
64- let indices = normalized_indices. execute :: < PrimitiveArray > ( ctx) ?;
58+ let indices = indices. clone ( ) . execute :: < PrimitiveArray > ( ctx) ?;
6559 let indices = indices. reinterpret_cast ( indices. ptype ( ) . to_unsigned ( ) ) ;
6660 let offsets = array. offsets ( ) . clone ( ) . execute :: < PrimitiveArray > ( ctx) ?;
6761 let offsets = offsets. reinterpret_cast ( offsets. ptype ( ) . to_unsigned ( ) ) ;
0 commit comments