MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / render_rows

Function render_rows

src/clusterd-test-driver/src/script.rs:1174–1187  ·  view source on GitHub ↗

Render peeked rows as deterministic golden text: each row's datums joined by spaces, with the rows sorted so the output is independent of arrangement order.

(rows: &[Row])

Source from the content-addressed store, hash-verified

1172/// Render peeked rows as deterministic golden text: each row's datums joined by
1173/// spaces, with the rows sorted so the output is independent of arrangement order.
1174fn render_rows(rows: &[Row]) -> String {
1175 let mut lines: Vec<String> = rows
1176 .iter()
1177 .map(|row| {
1178 row.unpack()
1179 .iter()
1180 .map(|datum| datum.to_string())
1181 .collect::<Vec<_>>()
1182 .join(" ")
1183 })
1184 .collect();
1185 lines.sort();
1186 lines.join("\n")
1187}
1188
1189/// Convert an optional `up_to` timestamp into a sink's exclusive upper antichain;
1190/// `None` is the empty antichain (no bound — the sink runs indefinitely).

Callers 1

executeMethod · 0.85

Calls 7

sortMethod · 0.80
collectMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
joinMethod · 0.45
unpackMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected