tustvold commented on code in PR #4387:
URL: https://github.com/apache/arrow-rs/pull/4387#discussion_r1223321788
##########
arrow-schema/src/field.rs:
##########
@@ -543,10 +543,23 @@ impl Field {
}
}
-// TODO: improve display with crate https://crates.io/crates/derive_more ?
+impl std::fmt::Debug for Field {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ write!(
+ f,
+ "Field {{ name: \"{}\", data_type: {:?}, nullable: {}, metadata:
{:?} }}",
+ self.name, self.data_type, self.nullable, self.metadata
+ )
+ }
+}
+
impl std::fmt::Display for Field {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- write!(f, "{self:?}")
+ write!(
Review Comment:
I think this could just use the debug impl?
##########
arrow-schema/src/field.rs:
##########
@@ -543,10 +543,23 @@ impl Field {
}
}
-// TODO: improve display with crate https://crates.io/crates/derive_more ?
+impl std::fmt::Debug for Field {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ write!(
Review Comment:
I think we should still print the dict id and ordered state if the datatype
is a dictionary
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]