Skip to content

Commit f90e331

Browse files
committed
Change rerun rrd print to use ChunkBatches for formatting
1 parent 81c8eb4 commit f90e331

File tree

1 file changed

+8
-8
lines changed
  • crates/top/rerun/src/commands/rrd

1 file changed

+8
-8
lines changed

crates/top/rerun/src/commands/rrd/print.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use itertools::Itertools;
33

44
use re_byte_size::SizeBytes as _;
55
use re_log_types::{LogMsg, SetStoreInfo};
6-
use re_sdk::log::Chunk;
76

87
use crate::commands::read_rrd_streams_from_file_or_stdin;
98

@@ -81,31 +80,32 @@ fn print_msg(verbose: u8, msg: LogMsg) -> anyhow::Result<()> {
8180
}
8281

8382
LogMsg::ArrowMsg(_row_id, arrow_msg) => {
84-
let chunk = Chunk::from_arrow_msg(&arrow_msg).context("skipped corrupt chunk")?;
83+
let chunk =
84+
re_sorbet::ChunkBatch::try_from(&arrow_msg.batch).context("corrupt chunk")?;
8585

8686
print!(
8787
"Chunk({}) with {} rows ({}) - {:?} - ",
88-
chunk.id(),
88+
chunk.chunk_id(),
8989
chunk.num_rows(),
9090
re_format::format_bytes(chunk.total_size_bytes() as _),
9191
chunk.entity_path(),
9292
);
9393

9494
if verbose == 0 {
9595
let column_names = chunk
96-
.component_names()
97-
.map(|name| name.short_name())
96+
.component_columns()
97+
.map(|(descr, _)| descr.component_name.short_name())
9898
.join(" ");
9999
println!("columns: [{column_names}]");
100100
} else if verbose == 1 {
101101
let column_descriptors = chunk
102-
.component_descriptors()
103-
.map(|descr| descr.short_name())
102+
.component_columns()
103+
.map(|(descr, _)| descr.to_string())
104104
.collect_vec()
105105
.join(" ");
106106
println!("columns: [{column_descriptors}]",);
107107
} else if verbose == 2 {
108-
println!("\n{}", chunk.emptied()); // headers only
108+
println!("\n{}", chunk.drop_all_rows()); // headers only
109109
} else {
110110
println!("\n{chunk}");
111111
}

0 commit comments

Comments
 (0)