Ted-Jiang commented on code in PR #10056:
URL: 
https://github.com/apache/arrow-datafusion/pull/10056#discussion_r1562205175


##########
datafusion/physical-expr/src/aggregate/approx_percentile_cont.rs:
##########
@@ -284,7 +284,9 @@ impl ApproxPercentileAccumulator {
     }
 
     pub(crate) fn merge_digests(&mut self, digests: &[TDigest]) {
-        self.digest = TDigest::merge_digests(digests);
+        let mut input_digests = digests.to_vec();

Review Comment:
   As one Accumulator call  merge() should not lose it inner status, this is 
not a good API desgion. 



##########
datafusion/physical-expr/src/aggregate/approx_percentile_cont.rs:
##########
@@ -284,7 +284,9 @@ impl ApproxPercentileAccumulator {
     }
 
     pub(crate) fn merge_digests(&mut self, digests: &[TDigest]) {
-        self.digest = TDigest::merge_digests(digests);
+        let mut input_digests = digests.to_vec();

Review Comment:
   As one Accumulator call  merge() should not lose it inner status, this is 
not a good API desgin. 



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

Reply via email to