Skip to content

Commit

Permalink
improve comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Jan 24, 2025
1 parent 84942b3 commit 5047371
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions datafusion/functions-aggregate/src/median.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T
) -> Result<()> {
assert_eq!(values.len(), 1, "one argument to merge_batch");

// The merged values should be organized like as a `ListArray` which is nullable,
// but `values` in it is `non-nullable`(`values` with nulls usually generated
// from `convert_to_state`).
// The merged values should be organized like as a `ListArray` which is nullable
// (input with nulls usually generated from `convert_to_state`), but `inner array` of
// `ListArray` is `non-nullable`.
//
// Following is the possible and impossible input `values`:
//
Expand All @@ -360,8 +360,8 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T

// Extend values to related groups
// TODO: avoid using iterator of the `ListArray`, this will lead to
// many calls of `slice` of its `values` array, and `slice` is not
// so efficient.
// many calls of `slice` of its ``inner array`, and `slice` is not
// so efficient(due to the calculation of `null_count` for each `slice`).
group_indices
.iter()
.zip(input_group_values.iter())
Expand Down

0 comments on commit 5047371

Please sign in to comment.