etseidl commented on code in PR #8680:
URL: https://github.com/apache/arrow-rs/pull/8680#discussion_r2460397853


##########
parquet/src/basic.rs:
##########
@@ -61,156 +61,112 @@ enum Type {
 
 // ----------------------------------------------------------------------
 // Mirrors thrift enum `ConvertedType`
-//
-// Cannot use macros because of added field `None`
 
 // TODO(ets): Adding the `NONE` variant to this enum is a bit awkward. We 
should
-// look into removing it and using `Option<ConvertedType>` instead. Then all 
of this
-// handwritten code could go away.
-
+// look into removing it and using `Option<ConvertedType>` instead.
+thrift_enum!(
 /// Common types (converted types) used by frameworks when using Parquet.
 ///
 /// This helps map between types in those frameworks to the base types in 
Parquet.
 /// This is only metadata and not needed to read or write the data.
 ///
 /// This struct was renamed from `LogicalType` in version 4.0.0.
 /// If targeting Parquet format 2.4.0 or above, please use [LogicalType] 
instead.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]

Review Comment:
   > My reading of the diff of this PR is that it removes `pub enum 
ConvertedType`, which is a public struct
   
   Ahh. The `thrift_enum` macro makes all enums `pub`, so that doesn't change.
   
   
https://github.com/apache/arrow-rs/blob/d519bb800340fa1a5e2601ae51cba82be3a7aa4b/parquet/src/parquet_macros.rs#L46
   
   Edit: I guess that fact could be better documented



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

Reply via email to