File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
datafusion/functions-aggregate/src Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,13 @@ impl<T: ArrowNumericType + Send> GroupsAccumulator for MedianGroupsAccumulator<T
387387 cur_len += group_value. len ( ) as i32 ;
388388 offsets. push ( cur_len) ;
389389 }
390+ // TODO: maybe we can use `OffsetBuffer::new_unchecked` like what in `convert_to_state`,
391+ // but safety should be considered more carefully here(and I am not sure if it can get
392+ // performance improvement when we introduce checks to keep the safety...).
393+ //
394+ // Can see more details in:
395+ // https://github.com/apache/datafusion/pull/13681#discussion_r1931209791
396+ //
390397 let offsets = OffsetBuffer :: new ( ScalarBuffer :: from ( offsets) ) ;
391398
392399 // Build inner array
You can’t perform that action at this time.
0 commit comments