File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
vortex-array/src/arrays/list/compute Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,17 @@ impl TakeKernel for ListVTable {
4343 match_each_integer_ptype!( indices. ptype( ) , |I | {
4444 let offsets_slice = offsets. as_slice:: <O >( ) ;
4545 let indices_slice: & [ I ] = indices. as_slice:: <I >( ) ;
46-
47- // Calculate total count to determine appropriate accumulation type
48- let total_count = indices_slice
46+ let approx_total_count = indices_slice
4947 . iter( )
5048 . map( |idx| {
5149 let idx: usize = idx. as_( ) ;
52- let diff : usize = ( offsets_slice[ idx + 1 ] - offsets_slice[ idx] ) . as_( ) ;
53- diff
50+ let length : usize = ( offsets_slice[ idx + 1 ] - offsets_slice[ idx] ) . as_( ) ;
51+ length
5452 } )
55- . sum:: <usize >( ) ;
53+ . max( )
54+ . unwrap_or( 0 ) ;
5655
57- match_smallest_offset_type!( total_count , |AccumType | {
56+ match_smallest_offset_type!( approx_total_count , |AccumType | {
5857 _take:: <I , O , AccumType >(
5958 array,
6059 offsets_slice,
You can’t perform that action at this time.
0 commit comments