Skip to content

Commit 3a1574d

Browse files
committed
fix: track coalescer's consumption
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
1 parent e104c7c commit 3a1574d

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
@@ -314,6 +314,7 @@ impl CoalesceBatchesStream {
314314
}
315315
}
316316
CoalesceBatchesStreamState::ReturnBuffer => {
317+
let _timer = cloned_time.timer();
317318
// Combine buffered batches into one batch and return it.
318319
let batch = self.coalescer.finish_batch()?;
319320
// Set to pull state for the next iteration.
@@ -326,6 +327,7 @@ impl CoalesceBatchesStream {
326327
// If buffer is empty, return None indicating the stream is fully consumed.
327328
Poll::Ready(None)
328329
} else {
330+
let _timer = cloned_time.timer();
329331
// If the buffer still contains batches, prepare to return them.
330332
let batch = self.coalescer.finish_batch()?;
331333
Poll::Ready(Some(Ok(batch)))

0 commit comments

Comments
 (0)