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

[GitHub] [arrow-rs] alamb opened a new pull request, #4276: Add `Debug` impls for public structs in Parquet crate

alamb opened a new pull request, #4276:
URL: https://github.com/apache/arrow-rs/pull/4276

   # Which issue does this PR close?
   
   N/A
   
   # Rationale for this change
    
   This caught me when working on https://github.com/influxdata/influxdb_iox/pull/7855
   
   I had to manually derive a `Debug` impl for a structure because the `ArrowWriter` didn't
   
   
   # What changes are included in this PR?
   
   1. Add `Debug` impls for public structs in Parquet crate
   
   Note that PR quickly got out of hand, but since I was in here I figured I would simply bash it out
   
   # Are there any user-facing changes?
   More `Debug`! 
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
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


[GitHub] [arrow-rs] alamb closed pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #4276: Add `Debug` impls for public structs in Parquet crate
URL: https://github.com/apache/arrow-rs/pull/4276


-- 
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


[GitHub] [arrow-rs] alamb commented on pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #4276:
URL: https://github.com/apache/arrow-rs/pull/4276#issuecomment-1561954907

   Will make a new PR with just the debug impls I want


-- 
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


[GitHub] [arrow-rs] tustvold commented on pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #4276:
URL: https://github.com/apache/arrow-rs/pull/4276#issuecomment-1561934221

   Could we just manually implement Debug for the public components, this seems like an inordinate amount of complexity that isn't really useful to print anyway?


-- 
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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4276:
URL: https://github.com/apache/arrow-rs/pull/4276#discussion_r1204751104


##########
parquet/src/arrow/array_reader/null_array.rs:
##########
@@ -42,6 +43,17 @@ where
     record_reader: RecordReader<T>,
 }
 
+impl<T> Debug for NullArrayReader<T>
+where
+    T: DataType,
+    T::T: ScalarValue,
+{
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("NullArrayReader<T>")

Review Comment:
   I freely admit I got lazy for some of these impls...



-- 
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


[GitHub] [arrow-rs] alamb commented on pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #4276:
URL: https://github.com/apache/arrow-rs/pull/4276#issuecomment-1561960410

   https://github.com/apache/arrow-rs/pull/4278


-- 
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


[GitHub] [arrow-rs] alamb commented on a diff in pull request #4276: Add `Debug` impls for public structs in Parquet crate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #4276:
URL: https://github.com/apache/arrow-rs/pull/4276#discussion_r1204751809


##########
parquet/src/record/api.rs:
##########
@@ -191,7 +192,7 @@ macro_rules! row_complex_accessor {
 
 impl RowFormatter for Row {
     /// Get Display reference for a given field.
-    fn fmt(&self, i: usize) -> &dyn fmt::Display {
+    fn fmt_for_display(&self, i: usize) -> &dyn fmt::Display {

Review Comment:
   This is a crate private trait and was shadowing the `fmt` in `Debug` so I renamed 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