scovich commented on code in PR #8135: URL: https://github.com/apache/arrow-rs/pull/8135#discussion_r2275231285
########## parquet-variant/src/variant.rs: ########## @@ -1286,6 +1286,59 @@ impl TryFrom<(i128, u8)> for Variant<'_, '_> { } } +impl std::fmt::Debug for Variant<'_, '_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Variant::Null => write!(f, "null"), + Variant::BooleanTrue => write!(f, "true"), + Variant::BooleanFalse => write!(f, "false"), + Variant::Int8(v) => write!(f, "{v}"), + Variant::Int16(v) => write!(f, "{v}"), + Variant::Int32(v) => write!(f, "{v}"), + Variant::Int64(v) => write!(f, "{v}"), + Variant::Float(v) => write!(f, "{v}"), + Variant::Double(v) => write!(f, "{v}"), + Variant::Decimal4(d) => write!(f, "{d}"), + Variant::Decimal8(d) => write!(f, "{d}"), + Variant::Decimal16(d) => write!(f, "{d}"), + Variant::Date(d) => write!(f, "\"{}\"", d.format("%Y-%m-%d")), + Variant::TimestampMicros(ts) => write!(f, "\"{}\"", ts.to_rfc3339()), + Variant::TimestampNtzMicros(ts) => { + write!(f, "\"{}\"", ts.format("%Y-%m-%dT%H:%M:%S%.6f")) + } + Variant::Binary(bytes) => { + write!(f, "\"0x")?; + for b in *bytes { + write!(f, "{:02x}", b)?; Review Comment: ```suggestion write!(f, "{b:02x}")?; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org