@@ -34,7 +34,7 @@ impl TakeExecute for Decimal {
3434 ctx : & mut ExecutionCtx ,
3535 ) -> VortexResult < Option < ArrayRef > > {
3636 if let Some ( piecewise_indices) = indices. as_opt :: < PiecewiseSequence > ( )
37- && let Some ( taken) = take_piecewise_sequence ( array, piecewise_indices, indices, ctx) ?
37+ && let Some ( taken) = take_contiguous_ranges ( array, piecewise_indices, indices, ctx) ?
3838 {
3939 return Ok ( Some ( taken) ) ;
4040 }
@@ -58,7 +58,7 @@ impl TakeExecute for Decimal {
5858 }
5959}
6060
61- fn take_piecewise_sequence (
61+ fn take_contiguous_ranges (
6262 array : ArrayView < ' _ , Decimal > ,
6363 indices : ArrayView < ' _ , PiecewiseSequence > ,
6464 indices_ref : & ArrayRef ,
@@ -71,30 +71,28 @@ fn take_piecewise_sequence(
7171 let output_len = indices_ref. len ( ) ;
7272 let taken = match lengths {
7373 UnitMultiplierLengths :: Constant ( length) => {
74- take_piecewise_sequence_constant_length ( array, & starts, length, validity, output_len) ?
74+ take_slices_constant_length ( array, & starts, length, validity, output_len) ?
7575 }
7676 UnitMultiplierLengths :: Array ( lengths) => {
77- take_piecewise_sequence_lengths ( array, & starts, & lengths, validity, output_len) ?
77+ take_slices ( array, & starts, & lengths, validity, output_len) ?
7878 }
7979 } ;
8080 Ok ( Some ( taken) )
8181}
8282
83- fn take_piecewise_sequence_constant_length (
83+ fn take_slices_constant_length (
8484 array : ArrayView < ' _ , Decimal > ,
8585 starts : & PrimitiveArray ,
8686 length : usize ,
8787 validity : Validity ,
8888 output_len : usize ,
8989) -> VortexResult < ArrayRef > {
9090 match_each_decimal_value_type ! ( array. values_type( ) , |D | {
91- take_piecewise_sequence_constant_length_typed:: <D >(
92- array, starts, length, validity, output_len,
93- )
91+ take_slices_constant_length_typed:: <D >( array, starts, length, validity, output_len)
9492 } )
9593}
9694
97- fn take_piecewise_sequence_constant_length_typed < D > (
95+ fn take_slices_constant_length_typed < D > (
9896 array : ArrayView < ' _ , Decimal > ,
9997 starts : & PrimitiveArray ,
10098 length : usize ,
@@ -105,7 +103,7 @@ where
105103 D : NativeDecimalType ,
106104{
107105 match_each_unsigned_integer_ptype ! ( starts. ptype( ) , |S | {
108- let values = take_piecewise_constant_length_to_buffer :: <S , D >(
106+ let values = take_slices_constant_length_to_buffer :: <S , D >(
109107 starts. as_slice:: <S >( ) ,
110108 length,
111109 array. buffer:: <D >( ) . as_slice( ) ,
@@ -120,19 +118,19 @@ where
120118 } )
121119}
122120
123- fn take_piecewise_sequence_lengths (
121+ fn take_slices (
124122 array : ArrayView < ' _ , Decimal > ,
125123 starts : & PrimitiveArray ,
126124 lengths : & PrimitiveArray ,
127125 validity : Validity ,
128126 output_len : usize ,
129127) -> VortexResult < ArrayRef > {
130128 match_each_decimal_value_type ! ( array. values_type( ) , |D | {
131- take_piecewise_sequence_lengths_typed :: <D >( array, starts, lengths, validity, output_len)
129+ take_slices_typed :: <D >( array, starts, lengths, validity, output_len)
132130 } )
133131}
134132
135- fn take_piecewise_sequence_lengths_typed < D > (
133+ fn take_slices_typed < D > (
136134 array : ArrayView < ' _ , Decimal > ,
137135 starts : & PrimitiveArray ,
138136 lengths : & PrimitiveArray ,
@@ -143,13 +141,11 @@ where
143141 D : NativeDecimalType ,
144142{
145143 match_each_unsigned_integer_ptype ! ( starts. ptype( ) , |S | {
146- take_piecewise_sequence_lengths_start_typed:: <D , S >(
147- array, starts, lengths, validity, output_len,
148- )
144+ take_slices_start_typed:: <D , S >( array, starts, lengths, validity, output_len)
149145 } )
150146}
151147
152- fn take_piecewise_sequence_lengths_start_typed < D , S > (
148+ fn take_slices_start_typed < D , S > (
153149 array : ArrayView < ' _ , Decimal > ,
154150 starts : & PrimitiveArray ,
155151 lengths : & PrimitiveArray ,
@@ -161,7 +157,7 @@ where
161157 S : UnsignedPType ,
162158{
163159 match_each_unsigned_integer_ptype ! ( lengths. ptype( ) , |L | {
164- let values = take_piecewise_to_buffer :: <S , L , D >(
160+ let values = take_slices_to_buffer :: <S , L , D >(
165161 starts. as_slice:: <S >( ) ,
166162 lengths. as_slice:: <L >( ) ,
167163 array. buffer:: <D >( ) . as_slice( ) ,
@@ -180,7 +176,7 @@ fn take_to_buffer<I: IntegerPType, T: NativeDecimalType>(indices: &[I], values:
180176 indices. iter ( ) . map ( |idx| values[ idx. as_ ( ) ] ) . collect ( )
181177}
182178
183- fn take_piecewise_constant_length_to_buffer < S , T > (
179+ fn take_slices_constant_length_to_buffer < S , T > (
184180 starts : & [ S ] ,
185181 length : usize ,
186182 values : & [ T ] ,
@@ -201,7 +197,7 @@ where
201197 Ok ( result. freeze ( ) )
202198}
203199
204- fn take_piecewise_to_buffer < S , L , T > (
200+ fn take_slices_to_buffer < S , L , T > (
205201 starts : & [ S ] ,
206202 lengths : & [ L ] ,
207203 values : & [ T ] ,
0 commit comments