From 764cfd0f0dd8f1bbfa9ebbc224082408cdc6cd88 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 2 Aug 2024 15:37:51 -0400 Subject: [PATCH] Fix MSRV error on 1.76.0 --- .../src/aggregate/groups_accumulator/prim_op.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs b/datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs index 5b9a0ef9df2ec..50380c9406784 100644 --- a/datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs +++ b/datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs @@ -141,7 +141,7 @@ where values: &[ArrayRef], opt_filter: Option<&BooleanArray>, ) -> Result> { - let values = values[0].as_primitive::(); + let values = values[0].as_primitive::().clone(); // Initializing state with starting values let initial_state = @@ -164,11 +164,11 @@ where let (dt, values_buf, original_nulls) = values.clone().into_parts(); let nulls_buf = NullBuffer::union(original_nulls.as_ref(), Some(&filter_nulls)); - &PrimitiveArray::::new(values_buf, nulls_buf).with_data_type(dt) + PrimitiveArray::::new(values_buf, nulls_buf).with_data_type(dt) } }; - let state_values = compute::binary_mut(initial_state, values, |mut x, y| { + let state_values = compute::binary_mut(initial_state, &values, |mut x, y| { (self.prim_fn)(&mut x, y); x });