File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
vortex-array/src/arrays/list/compute Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 44use vortex_buffer:: BitBufferMut ;
55use vortex_dtype:: IntegerPType ;
66use vortex_dtype:: Nullability ;
7- use vortex_dtype:: match_each_integer_ptype;
7+ use vortex_dtype:: { match_each_integer_ptype, match_smallest_offset_type } ;
88use vortex_error:: VortexExpect ;
99use vortex_error:: VortexResult ;
1010use vortex_error:: vortex_panic;
@@ -81,18 +81,16 @@ fn _take<I: IntegerPType, O: IntegerPType>(
8181 let mut current_offset = 0u64 ;
8282 new_offsets. append_zero ( ) ;
8383
84- // Approximate the total element count.
85- let approx_total_count = indices
84+ // Total element count.
85+ let total_count = indices
8686 . iter ( )
8787 . map ( |idx| {
8888 let idx = idx
8989 . to_usize ( )
9090 . unwrap_or_else ( || vortex_panic ! ( "Failed to convert index to usize: {}" , idx) ) ;
9191 ( offsets[ idx + 1 ] - offsets[ idx] ) . as_ ( ) as usize
9292 } )
93- . max ( )
94- . unwrap_or ( 0 )
95- * array. len ( ) ;
93+ . sum :: < usize > ( ) ;
9694
9795 for & data_idx in indices {
9896 let data_idx = data_idx
You can’t perform that action at this time.
0 commit comments