diff --git a/datafusion/physical-plan/src/aggregates/group_values/column.rs b/datafusion/physical-plan/src/aggregates/group_values/column.rs index daf3f870b8b35..5543ef84b9868 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/column.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/column.rs @@ -1146,7 +1146,8 @@ mod tests { }; let sub_batch = group_values.emit(EmitTo::First(num_emit)).unwrap(); - let sub_batch = RecordBatch::try_new(schema.clone(), sub_batch).unwrap(); + let sub_batch = + RecordBatch::try_new(Arc::clone(&schema), sub_batch).unwrap(); actual_sub_batches.push(sub_batch); num_remaining_rows -= num_emit; @@ -1467,7 +1468,7 @@ mod tests { fn load_to_group_values(&self, group_values: &mut impl GroupValues) { for batch in self.test_batches.iter() { - group_values.intern(&batch, &mut vec![]).unwrap(); + group_values.intern(batch, &mut vec![]).unwrap(); } } diff --git a/datafusion/physical-plan/src/aggregates/group_values/group_column.rs b/datafusion/physical-plan/src/aggregates/group_values/group_column.rs index ec3d1cbe9c24d..31ca3ebbb89e0 100644 --- a/datafusion/physical-plan/src/aggregates/group_values/group_column.rs +++ b/datafusion/physical-plan/src/aggregates/group_values/group_column.rs @@ -1197,7 +1197,7 @@ mod tests { equal_to_results: &mut Vec| { let iter = lhs_rows.iter().zip(rhs_rows.iter()); for (idx, (&lhs_row, &rhs_row)) in iter.enumerate() { - equal_to_results[idx] = builder.equal_to(lhs_row, &input_array, rhs_row); + equal_to_results[idx] = builder.equal_to(lhs_row, input_array, rhs_row); } }; @@ -1310,7 +1310,7 @@ mod tests { equal_to_results: &mut Vec| { let iter = lhs_rows.iter().zip(rhs_rows.iter()); for (idx, (&lhs_row, &rhs_row)) in iter.enumerate() { - equal_to_results[idx] = builder.equal_to(lhs_row, &input_array, rhs_row); + equal_to_results[idx] = builder.equal_to(lhs_row, input_array, rhs_row); } }; @@ -1500,7 +1500,7 @@ mod tests { equal_to_results: &mut Vec| { let iter = lhs_rows.iter().zip(rhs_rows.iter()); for (idx, (&lhs_row, &rhs_row)) in iter.enumerate() { - equal_to_results[idx] = builder.equal_to(lhs_row, &input_array, rhs_row); + equal_to_results[idx] = builder.equal_to(lhs_row, input_array, rhs_row); } }; @@ -1703,7 +1703,7 @@ mod tests { equal_to_results: &mut Vec| { let iter = lhs_rows.iter().zip(rhs_rows.iter()); for (idx, (&lhs_row, &rhs_row)) in iter.enumerate() { - equal_to_results[idx] = builder.equal_to(lhs_row, &input_array, rhs_row); + equal_to_results[idx] = builder.equal_to(lhs_row, input_array, rhs_row); } };