We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc8de02 commit a6c8dbeCopy full SHA for a6c8dbe
datafusion/datasource/src/memory.rs
@@ -426,15 +426,7 @@ impl DataSource for MemorySourceConfig {
426
}
427
DisplayFormatType::TreeRender => {
428
let total_rows = self.partitions.iter().map(|b| b.len()).sum::<usize>();
429
- let total_bytes = self
430
- .partitions
431
- .iter()
432
- .map(|b| {
433
- b.iter()
434
- .map(|batch| batch.get_array_memory_size())
435
- .sum::<usize>()
436
- })
437
- .sum::<usize>();
+ let total_bytes: usize = self.partitions.iter().flatten().map(|batch| batch.get_array_memory_size()).sum();
438
writeln!(f, "format=memory")?;
439
writeln!(f, "rows={total_rows}")?;
440
writeln!(f, "bytes={total_bytes}")?;
0 commit comments