You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/06/16 10:57:49 UTC
[arrow-datafusion] branch main updated: removed self.all_value.len() from reserve (#6689)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 4a2c28c173 removed self.all_value.len() from reserve (#6689)
4a2c28c173 is described below
commit 4a2c28c173e849e35ff8957febd6e2ea405b9950
Author: BryanEmond <70...@users.noreply.github.com>
AuthorDate: Fri Jun 16 06:57:44 2023 -0400
removed self.all_value.len() from reserve (#6689)
---
datafusion/physical-expr/src/aggregate/median.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/datafusion/physical-expr/src/aggregate/median.rs b/datafusion/physical-expr/src/aggregate/median.rs
index 9c2d85bba0..6f79c98a6c 100644
--- a/datafusion/physical-expr/src/aggregate/median.rs
+++ b/datafusion/physical-expr/src/aggregate/median.rs
@@ -126,7 +126,7 @@ impl Accumulator for MedianAccumulator {
let array = &values[0];
assert_eq!(array.data_type(), &self.data_type);
- self.all_values.reserve(self.all_values.len() + array.len());
+ self.all_values.reserve(array.len());
for index in 0..array.len() {
self.all_values
.push(ScalarValue::try_from_array(array, index)?);