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

Function write_first_rows

src/expr/src/explain/text.rs:1495–1511  ·  view source on GitHub ↗
(
    f: &mut fmt::Formatter<'_>,
    first_rows: &Vec<(&Row, &Diff)>,
    ctx: &Indent,
    redacted: bool,
)

Source from the content-addressed store, hash-verified

1493}
1494
1495fn write_first_rows(
1496 f: &mut fmt::Formatter<'_>,
1497 first_rows: &Vec<(&Row, &Diff)>,
1498 ctx: &Indent,
1499 redacted: bool,
1500) -> fmt::Result {
1501 let mode = HumanizedExplain::new(redacted);
1502 for (row, diff) in first_rows {
1503 let row = mode.expr(*row, None);
1504 if **diff == Diff::ONE {
1505 writeln!(f, "{}- {}", ctx, row)?;
1506 } else {
1507 writeln!(f, "{}- ({} x {})", ctx, row, diff)?;
1508 }
1509 }
1510 Ok(())
1511}

Callers 1

fmt_text_constant_rowsFunction · 0.85

Calls 1

exprMethod · 0.45

Tested by

no test coverage detected