Skip to content

Commit

Permalink
refactor: improve timer handling
Browse files Browse the repository at this point in the history
  • Loading branch information
crepererum committed Jan 13, 2023
1 parent b2af7b0 commit 1ceff4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/core/src/physical_plan/repartition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl BatchPartitioner {
num_partitions: partitions,
hash_buffer,
} => {
let mut timer = self.timer.timer();
let timer = self.timer.timer();

let arrays = exprs
.iter()
Expand Down Expand Up @@ -210,8 +210,8 @@ impl BatchPartitioner {
let batch =
RecordBatch::try_new(batch.schema(), columns).unwrap();

timer.stop();
timer.restart();
// bind timer so it drops w/ this iterator
let _ = &timer;

Ok((partition, batch))
});
Expand Down

0 comments on commit 1ceff4c

Please sign in to comment.