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 @@ -784,8 +784,7 @@ impl Accumulator for TrivialFirstValueAccumulator {
784784 first_idx = Some ( 0 ) ;
785785 }
786786 if let Some ( first_idx) = first_idx {
787- let mut row = get_row_at_idx ( values, first_idx) ?;
788- self . first = row. swap_remove ( 0 ) ;
787+ self . first = ScalarValue :: try_from_array ( & values[ 0 ] , first_idx) ?;
789788 self . first . compact ( ) ;
790789 self . is_set = true ;
791790 }
@@ -1176,8 +1175,7 @@ impl Accumulator for TrivialLastValueAccumulator {
11761175 last_idx = Some ( value. len ( ) - 1 ) ;
11771176 }
11781177 if let Some ( last_idx) = last_idx {
1179- let mut row = get_row_at_idx ( values, last_idx) ?;
1180- self . last = row. swap_remove ( 0 ) ;
1178+ self . last = ScalarValue :: try_from_array ( & values[ 0 ] , last_idx) ?;
11811179 self . last . compact ( ) ;
11821180 self . is_set = true ;
11831181 }
You can’t perform that action at this time.
0 commit comments