alamb commented on code in PR #7494:
URL: https://github.com/apache/arrow-datafusion/pull/7494#discussion_r1318894752
##########
datafusion/physical-expr/src/aggregate/average.rs:
##########
@@ -505,8 +503,8 @@ where
let counts = UInt64Array::new(counts.into(), nulls.clone()); // zero
copy
let sums = emit_to.take_needed(&mut self.sums);
- let sums = PrimitiveArray::<T>::new(sums.into(), nulls); // zero copy
- let sums = adjust_output_array(&self.sum_data_type, Arc::new(sums))?;
+ let sums = PrimitiveArray::<T>::new(sums.into(), nulls) // zero copy
+ .with_data_type(self.sum_data_type.clone());
Review Comment:
👍 this is a very nice improvement
##########
datafusion/physical-expr/src/aggregate/average.rs:
##########
@@ -505,8 +503,8 @@ where
let counts = UInt64Array::new(counts.into(), nulls.clone()); // zero
copy
let sums = emit_to.take_needed(&mut self.sums);
- let sums = PrimitiveArray::<T>::new(sums.into(), nulls); // zero copy
- let sums = adjust_output_array(&self.sum_data_type, Arc::new(sums))?;
+ let sums = PrimitiveArray::<T>::new(sums.into(), nulls) // zero copy
+ .with_data_type(self.sum_data_type.clone());
Review Comment:
👍 this is a very nice improvement
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]