Skip to content

Commit 4b8a2d8

Browse files
Standing-Manalamb
andauthored
Implement tree explain for RepartitionExec and WorkTableExec (#15137)
* feat: implement tree rendering for RepartitionExec Signed-off-by: Alan Tang <[email protected]> * feat: implement tree rendering for WorkTableExec Signed-off-by: Alan Tang <[email protected]> * bug: fix clippy error Signed-off-by: Alan Tang <[email protected]> --------- Signed-off-by: Alan Tang <[email protected]> Co-authored-by: Andrew Lamb <[email protected]>
1 parent 411185f commit 4b8a2d8

File tree

3 files changed

+511
-269
lines changed

3 files changed

+511
-269
lines changed

datafusion/physical-plan/src/repartition/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,16 @@ impl DisplayAs for RepartitionExec {
507507
Ok(())
508508
}
509509
DisplayFormatType::TreeRender => {
510-
// TODO: collect info
511-
write!(f, "")
510+
writeln!(f, "partitioning_scheme={}", self.partitioning(),)?;
511+
writeln!(
512+
f,
513+
"output_partition_count={}",
514+
self.input.output_partitioning().partition_count()
515+
)?;
516+
if self.preserve_order {
517+
writeln!(f, "preserve_order={}", self.preserve_order)?;
518+
}
519+
Ok(())
512520
}
513521
}
514522
}

datafusion/physical-plan/src/work_table.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ impl DisplayAs for WorkTableExec {
163163
write!(f, "WorkTableExec: name={}", self.name)
164164
}
165165
DisplayFormatType::TreeRender => {
166-
// TODO: collect info
167-
write!(f, "")
166+
write!(f, "name={}", self.name)
168167
}
169168
}
170169
}

0 commit comments

Comments
 (0)