Skip to content

Commit

Permalink
add todo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Jan 27, 2025
1 parent 4725234 commit d2d8ca9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions datafusion/functions-aggregate/src/median.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,13 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T
cur_len += group_value.len() as i32;
offsets.push(cur_len);
}
// TODO: maybe we can use `OffsetBuffer::new_unchecked` like what in `convert_to_state`,
// but safety should be considered more carefully here(and I am not sure if it can get
// performance improvement when we introduce checks to keep the safety...).
//
// Can see more details in:
// https://github.com/apache/datafusion/pull/13681#discussion_r1931209791
//
let offsets = OffsetBuffer::new(ScalarBuffer::from(offsets));

// Build inner array
Expand Down

0 comments on commit d2d8ca9

Please sign in to comment.