INNER CODE UNIT · Rust
fmt
apache/datafusion-sqlparser-rs · src/ast/mod.rs:618
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(name) = &self.field_name {
write!(f, "{name} {}", self.field_type)?;
} else {
write!(f, "{}", self.field_type)?;
}
if let Some(options) = &self.options {
write!(f, " OPTIONS({})", display_separated(options, ", "))
} else {
Ok(())
}
}
}
/// A field definition within a union
///
/// [DuckDB]: https://duckdb.org/docs/sql/data_types/union.html
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]