Skip to content

Commit d5ecaca

Browse files
authored
fix: track coalescer's consumption (#16048)
Signed-off-by: Ruihang Xia <[email protected]>
1 parent 8f898a7 commit d5ecaca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

datafusion/physical-plan/src/coalesce_batches.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ impl CoalesceBatchesStream {
354354
}
355355
}
356356
CoalesceBatchesStreamState::ReturnBuffer => {
357+
let _timer = cloned_time.timer();
357358
// Combine buffered batches into one batch and return it.
358359
let batch = self.coalescer.finish_batch()?;
359360
// Set to pull state for the next iteration.
@@ -366,6 +367,7 @@ impl CoalesceBatchesStream {
366367
// If buffer is empty, return None indicating the stream is fully consumed.
367368
Poll::Ready(None)
368369
} else {
370+
let _timer = cloned_time.timer();
369371
// If the buffer still contains batches, prepare to return them.
370372
let batch = self.coalescer.finish_batch()?;
371373
Poll::Ready(Some(Ok(batch)))

0 commit comments

Comments
 (0)