Skip to content

Commit

Permalink
rm clear to avoid reallocation
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed Oct 2, 2024
1 parent 07e4f78 commit 80aae67
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions datafusion/physical-plan/src/aggregates/row_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@ impl GroupedHashAggregateStream {
for (index, group_values) in group_by_values.iter().enumerate() {
let n_rows = group_values[0].len();
let batch_hashes = &mut self.hashes_buffer[index];
batch_hashes.clear();
batch_hashes.resize(n_rows, 0);
create_hashes(group_values, &self.random_state, batch_hashes)?;

Expand All @@ -824,7 +823,6 @@ impl GroupedHashAggregateStream {
for (index, group_values) in group_by_values.iter().enumerate() {
let n_rows = group_values[0].len();
let batch_hashes = &mut self.hashes_buffer[index];
batch_hashes.clear();
batch_hashes.resize(n_rows, 0);
create_hashes(group_values, &self.random_state, batch_hashes)?;
}
Expand Down

0 comments on commit 80aae67

Please sign in to comment.