Apache DataFusion SQL Query Engine
Fix CoalesceBatches elasped_compute metric (#4664)
Jeffrey9f6387ec25a3
diff --git a/datafusion/core/src/physical_plan/coalesce_batches.rs b/datafusion/core/src/physical_plan/coalesce_batches.rsindex 762bd90921..4bec6d73db 100644--- a/datafusion/core/src/physical_plan/coalesce_batches.rs+++ b/datafusion/core/src/physical_plan/coalesce_batches.rs@@ -197,14 +197,14 @@ impl CoalesceBatchesStream {) -> Poll<Option<ArrowResult<RecordBatch>>> {// Get a clone (uses same underlying atomic) as self gets borrowed belowlet cloned_time = self.baseline_metrics.elapsed_compute().clone();- // records time on drop- let _timer = cloned_time.timer();if self.is_closed {return Poll::Ready(None);}loop {let input_batch = self.input.poll_next_unpin(cx);+ // records time on drop+ let _timer = cloned_time.timer();match input_batch {Poll::Ready(x) => match x {Some(Ok(ref batch)) => {