From 1ceff4c8f477f781ca9aba1998ab85ebe1848de3 Mon Sep 17 00:00:00 2001 From: Marco Neumann Date: Fri, 13 Jan 2023 08:29:32 +0100 Subject: [PATCH] refactor: improve timer handling --- datafusion/core/src/physical_plan/repartition/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datafusion/core/src/physical_plan/repartition/mod.rs b/datafusion/core/src/physical_plan/repartition/mod.rs index ec1d092ae7acb..90e063e94816b 100644 --- a/datafusion/core/src/physical_plan/repartition/mod.rs +++ b/datafusion/core/src/physical_plan/repartition/mod.rs @@ -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() @@ -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)) });