Skip to content

Commit fab464d

Browse files
committed
Improve DisplayAs for BufferExec
1 parent d70cb49 commit fab464d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

datafusion/physical-plan/src/buffer.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,15 @@ impl BufferExec {
9292
}
9393

9494
impl DisplayAs for BufferExec {
95-
fn fmt_as(&self, _t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
96-
write!(f, "{}: queue_size_bytes={}", self.name(), self.capacity)
95+
fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
96+
match t {
97+
DisplayFormatType::Default | DisplayFormatType::Verbose => {
98+
write!(f, "BufferExec: capacity={}", self.capacity)
99+
}
100+
DisplayFormatType::TreeRender => {
101+
writeln!(f, "target_batch_size={}", self.capacity)
102+
}
103+
}
97104
}
98105
}
99106

0 commit comments

Comments
 (0)