You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/05/24 23:34:06 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #4278: Add `Debug` impls for `ArrowWriter` and `SerializedFileWriter`

viirya commented on code in PR #4278:
URL: https://github.com/apache/arrow-rs/pull/4278#discussion_r1204852513


##########
parquet/src/file/writer.rs:
##########
@@ -147,6 +148,18 @@ pub struct SerializedFileWriter<W: Write> {
     kv_metadatas: Vec<KeyValue>,
 }
 
+impl<W: Write> Debug for SerializedFileWriter<W> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        // implement Debug so this can be used with #[derive(Debug)]
+        // in client code rather than actually listing all the fields
+        f.debug_struct("SerializedFileWriter<W>")

Review Comment:
   Is it meaningful to have `W` in debug? No much info from it. Looks `ArrowWriter` doesn't have it.



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org