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

Method humanize

src/transform/src/typecheck.rs:1711–1728  ·  view source on GitHub ↗

Pretty prints a type difference Always indents two spaces

(&self, h: &H, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

1709 ///
1710 /// Always indents two spaces
1711 pub fn humanize<H>(&self, h: &H, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
1712 where
1713 H: ExprHumanizer,
1714 {
1715 use ReprRelationTypeDifference::*;
1716 match self {
1717 Length { len_sub, len_sup } => {
1718 writeln!(
1719 f,
1720 " number of columns do not match ({len_sub} != {len_sup})"
1721 )
1722 }
1723 Column { col, diff } => {
1724 writeln!(f, " column {col} differs:")?;
1725 diff.humanize(4, h, f)
1726 }
1727 }
1728 }
1729}
1730
1731impl ReprColumnTypeDifference {

Callers 1

fmtMethod · 0.45

Calls 9

columns_prettyFunction · 0.85
humanize_scalar_typeMethod · 0.80
write_charMethod · 0.80
enumerateMethod · 0.80
humanize_column_typeMethod · 0.45
iterMethod · 0.45
sourceMethod · 0.45
lenMethod · 0.45
exprMethod · 0.45

Tested by

no test coverage detected