@@ -1107,7 +1107,7 @@ mod tests {
11071107 ) {
11081108 let output = create_decimal_array :: < T > ( data, precision, scale) ;
11091109 let expected = UInt32Array :: from ( expected_data) ;
1110- let output = sort_to_indices ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ;
1110+ let output = sort_to_indices ( & output, options, limit) . unwrap ( ) ;
11111111 assert_eq ! ( output, expected)
11121112 }
11131113
@@ -1119,7 +1119,7 @@ mod tests {
11191119 ) {
11201120 let output = create_decimal256_array ( data) ;
11211121 let expected = UInt32Array :: from ( expected_data) ;
1122- let output = sort_to_indices ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ;
1122+ let output = sort_to_indices ( & output, options, limit) . unwrap ( ) ;
11231123 assert_eq ! ( output, expected)
11241124 }
11251125
@@ -1134,8 +1134,8 @@ mod tests {
11341134 let output = create_decimal_array :: < T > ( data, p, s) ;
11351135 let expected = Arc :: new ( create_decimal_array :: < T > ( expected_data, p, s) ) as ArrayRef ;
11361136 let output = match limit {
1137- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1138- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1137+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1138+ _ => sort ( & output, options) . unwrap ( ) ,
11391139 } ;
11401140 assert_eq ! ( & output, & expected)
11411141 }
@@ -1149,8 +1149,8 @@ mod tests {
11491149 let output = create_decimal256_array ( data) ;
11501150 let expected = Arc :: new ( create_decimal256_array ( expected_data) ) as ArrayRef ;
11511151 let output = match limit {
1152- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1153- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1152+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1153+ _ => sort ( & output, options) . unwrap ( ) ,
11541154 } ;
11551155 assert_eq ! ( & output, & expected)
11561156 }
@@ -1163,7 +1163,7 @@ mod tests {
11631163 ) {
11641164 let output = BooleanArray :: from ( data) ;
11651165 let expected = UInt32Array :: from ( expected_data) ;
1166- let output = sort_to_indices ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ;
1166+ let output = sort_to_indices ( & output, options, limit) . unwrap ( ) ;
11671167 assert_eq ! ( output, expected)
11681168 }
11691169
@@ -1178,7 +1178,7 @@ mod tests {
11781178 {
11791179 let output = PrimitiveArray :: < T > :: from ( data) ;
11801180 let expected = UInt32Array :: from ( expected_data) ;
1181- let output = sort_to_indices ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ;
1181+ let output = sort_to_indices ( & output, options, limit) . unwrap ( ) ;
11821182 assert_eq ! ( output, expected)
11831183 }
11841184
@@ -1194,8 +1194,8 @@ mod tests {
11941194 let output = PrimitiveArray :: < T > :: from ( data) ;
11951195 let expected = Arc :: new ( PrimitiveArray :: < T > :: from ( expected_data) ) as ArrayRef ;
11961196 let output = match limit {
1197- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1198- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1197+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1198+ _ => sort ( & output, options) . unwrap ( ) ,
11991199 } ;
12001200 assert_eq ! ( & output, & expected)
12011201 }
@@ -1208,7 +1208,7 @@ mod tests {
12081208 ) {
12091209 let output = StringArray :: from ( data) ;
12101210 let expected = UInt32Array :: from ( expected_data) ;
1211- let output = sort_to_indices ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ;
1211+ let output = sort_to_indices ( & output, options, limit) . unwrap ( ) ;
12121212 assert_eq ! ( output, expected)
12131213 }
12141214
@@ -1222,24 +1222,24 @@ mod tests {
12221222 let output = StringArray :: from ( data. clone ( ) ) ;
12231223 let expected = Arc :: new ( StringArray :: from ( expected_data. clone ( ) ) ) as ArrayRef ;
12241224 let output = match limit {
1225- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1226- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1225+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1226+ _ => sort ( & output, options) . unwrap ( ) ,
12271227 } ;
12281228 assert_eq ! ( & output, & expected) ;
12291229
12301230 let output = LargeStringArray :: from ( data. clone ( ) ) ;
12311231 let expected = Arc :: new ( LargeStringArray :: from ( expected_data. clone ( ) ) ) as ArrayRef ;
12321232 let output = match limit {
1233- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1234- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1233+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1234+ _ => sort ( & output, options) . unwrap ( ) ,
12351235 } ;
12361236 assert_eq ! ( & output, & expected) ;
12371237
12381238 let output = StringViewArray :: from ( data) ;
12391239 let expected = Arc :: new ( StringViewArray :: from ( expected_data) ) as ArrayRef ;
12401240 let output = match limit {
1241- Some ( _) => sort_limit ( & ( Arc :: new ( output) as ArrayRef ) , options, limit) . unwrap ( ) ,
1242- _ => sort ( & ( Arc :: new ( output) as ArrayRef ) , options) . unwrap ( ) ,
1241+ Some ( _) => sort_limit ( & output, options, limit) . unwrap ( ) ,
1242+ _ => sort ( & output, options) . unwrap ( ) ,
12431243 } ;
12441244 assert_eq ! ( & output, & expected) ;
12451245 }
@@ -1258,8 +1258,8 @@ mod tests {
12581258 . expect ( "Unable to get dictionary values" ) ;
12591259
12601260 let sorted = match limit {
1261- Some ( _) => sort_limit ( & ( Arc :: new ( array) as ArrayRef ) , options, limit) . unwrap ( ) ,
1262- _ => sort ( & ( Arc :: new ( array) as ArrayRef ) , options) . unwrap ( ) ,
1261+ Some ( _) => sort_limit ( & array, options, limit) . unwrap ( ) ,
1262+ _ => sort ( & array, options) . unwrap ( ) ,
12631263 } ;
12641264 let sorted = sorted
12651265 . as_any ( )
@@ -1300,8 +1300,8 @@ mod tests {
13001300 let dict = array_values. as_primitive :: < T > ( ) ;
13011301
13021302 let sorted = match limit {
1303- Some ( _) => sort_limit ( & ( Arc :: new ( array) as ArrayRef ) , options, limit) . unwrap ( ) ,
1304- _ => sort ( & ( Arc :: new ( array) as ArrayRef ) , options) . unwrap ( ) ,
1303+ Some ( _) => sort_limit ( & array, options, limit) . unwrap ( ) ,
1304+ _ => sort ( & array, options) . unwrap ( ) ,
13051305 } ;
13061306 let sorted = sorted
13071307 . as_any ( )
0 commit comments