@@ -24,13 +24,11 @@ use crate::arrays::list::ListArrayExt;
2424use crate :: arrays:: piecewise_sequence:: constant_unsigned_usize;
2525use crate :: arrays:: piecewise_sequence:: maybe_contiguous_slices;
2626use crate :: arrays:: primitive:: PrimitiveArrayExt ;
27- use crate :: builtins:: ArrayBuiltins ;
2827use crate :: dtype:: IntegerPType ;
2928use crate :: dtype:: UnsignedPType ;
3029use crate :: executor:: ExecutionCtx ;
3130use crate :: match_each_unsigned_integer_ptype;
3231use crate :: match_smallest_offset_type;
33- use crate :: scalar:: Scalar ;
3432use crate :: validity:: Validity ;
3533
3634// TODO(connor)[ListView]: Re-revert to the version where we simply convert to a `ListView` and call
@@ -55,11 +53,7 @@ impl TakeExecute for List {
5553 }
5654
5755 let new_validity = array. validity ( ) ?. take ( indices) ?;
58- let normalized_indices = indices
59- . clone ( )
60- . mask ( new_validity. to_array ( indices. len ( ) ) ) ?
61- . fill_null ( Scalar :: from ( 0 ) . cast ( indices. dtype ( ) ) ?) ?;
62- let indices = normalized_indices. execute :: < PrimitiveArray > ( ctx) ?;
56+ let indices = indices. clone ( ) . execute :: < PrimitiveArray > ( ctx) ?;
6357 let indices = indices. reinterpret_cast ( indices. ptype ( ) . to_unsigned ( ) ) ;
6458 let offsets = array. offsets ( ) . clone ( ) . execute :: < PrimitiveArray > ( ctx) ?;
6559 let offsets = offsets. reinterpret_cast ( offsets. ptype ( ) . to_unsigned ( ) ) ;
0 commit comments