petern48 commented on code in PR #19278:
URL: https://github.com/apache/datafusion/pull/19278#discussion_r2616516573


##########
datafusion/functions-aggregate/src/median.rs:
##########
@@ -289,14 +289,32 @@ impl<T: ArrowNumericType> Accumulator for 
MedianAccumulator<T> {
     }
 
     fn evaluate(&mut self) -> Result<ScalarValue> {
-        let d = std::mem::take(&mut self.all_values);
+        let d = self.all_values.clone();

Review Comment:
   Great idea! Fixed a bug too: 
https://github.com/apache/datafusion/pull/19278#discussion_r2616516125



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to