@@ -280,7 +280,7 @@ impl<T: ArrowNumericType> Accumulator for MedianAccumulator<T> {
280
280
///
281
281
/// For calculating the accurate medians of groups, we need to store all values
282
282
/// of groups before final evaluation.
283
- /// So values in each group will be stored in a `Vec<T>`, so the total group values
283
+ /// So values in each group will be stored in a `Vec<T>`, and the total group values
284
284
/// will be actually organized as a `Vec<Vec<T>>`.
285
285
///
286
286
#[ derive( Debug ) ]
@@ -333,9 +333,9 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T
333
333
) -> Result < ( ) > {
334
334
assert_eq ! ( values. len( ) , 1 , "one argument to merge_batch" ) ;
335
335
336
- // The merged values should be organized like as a `ListArray` which is nullable,
337
- // but `values` in it is `non-nullable`(`values` with nulls usually generated
338
- // from `convert_to_state`) .
336
+ // The merged values should be organized like as a `ListArray` which is nullable
337
+ // (input with nulls usually generated from `convert_to_state`), but `inner array` of
338
+ // `ListArray` is `non-nullable` .
339
339
//
340
340
// Following is the possible and impossible input `values`:
341
341
//
@@ -360,8 +360,8 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T
360
360
361
361
// Extend values to related groups
362
362
// TODO: avoid using iterator of the `ListArray`, this will lead to
363
- // many calls of `slice` of its `values` array, and `slice` is not
364
- // so efficient.
363
+ // many calls of `slice` of its ``inner array` , and `slice` is not
364
+ // so efficient(due to the calculation of `null_count` for each `slice`) .
365
365
group_indices
366
366
. iter ( )
367
367
. zip ( input_group_values. iter ( ) )
0 commit comments