etseidl commented on code in PR #8680:
URL: https://github.com/apache/arrow-rs/pull/8680#discussion_r2460359722
##########
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:
> this is a breaking API change I think given that `ConvertedType` is pub:
https://docs.rs/parquet/latest/parquet/basic/enum.ConvertedType.html
I'm just curious as to what makes this a breaking change? Adding derived
impls or changing the discriminants to match the spec? I didn't think either
would qualify.
>
> Maybe to avoid the breaking change, we could deprecate ConvertedType
instead 🤔
I like the way you think 😄. I think it's long overdue to standardize on
logical type and stop using converted type altogether.
--
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]