File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
datafusion/functions-aggregate/src Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -800,8 +800,7 @@ impl Accumulator for TrivialFirstValueAccumulator {
800800 first_idx = Some ( 0 ) ;
801801 }
802802 if let Some ( first_idx) = first_idx {
803- let mut row = get_row_at_idx ( values, first_idx) ?;
804- self . first = row. swap_remove ( 0 ) ;
803+ self . first = ScalarValue :: try_from_array ( & values[ 0 ] , first_idx) ?;
805804 self . first . compact ( ) ;
806805 self . is_set = true ;
807806 }
@@ -1292,8 +1291,7 @@ impl Accumulator for TrivialLastValueAccumulator {
12921291 last_idx = Some ( value. len ( ) - 1 ) ;
12931292 }
12941293 if let Some ( last_idx) = last_idx {
1295- let mut row = get_row_at_idx ( values, last_idx) ?;
1296- self . last = row. swap_remove ( 0 ) ;
1294+ self . last = ScalarValue :: try_from_array ( & values[ 0 ] , last_idx) ?;
12971295 self . last . compact ( ) ;
12981296 self . is_set = true ;
12991297 }
You can’t perform that action at this time.
0 commit comments