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