Skip to content

Commit

Permalink
make Debug for MemoryExec prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Sep 22, 2024
1 parent 3978e5d commit 88fa5c3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions datafusion/physical-plan/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ pub struct MemoryExec {

impl fmt::Debug for MemoryExec {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "partitions: [...]")?;
write!(f, "schema: {:?}", self.projected_schema)?;
write!(f, "projection: {:?}", self.projection)?;
if let Some(sort_info) = &self.sort_information.first() {
write!(f, ", output_ordering: {:?}", sort_info)?;
}
Ok(())
f.debug_struct("MemoryExec")
.field("partitions", &"[...]")
.field("schema", &self.schema)
.field("projection", &self.projection)
.field("sort_information", &self.sort_information)
.finish()
}
}

Expand Down

0 comments on commit 88fa5c3

Please sign in to comment.