klion26 commented on code in PR #10157:
URL: https://github.com/apache/arrow-rs/pull/10157#discussion_r3433439160


##########
parquet-variant-compute/src/type_conversion.rs:
##########
@@ -78,53 +85,166 @@ macro_rules! impl_primitive_from_variant {
 macro_rules! impl_timestamp_from_variant {
     ($timestamp_type:ty, $variant_method:ident, ntz=$ntz:ident, $cast_fn:expr 
$(,)?) => {
         impl TimestampFromVariant<{ $ntz }> for $timestamp_type {
-            fn from_variant(variant: &Variant<'_, '_>) -> Option<Self::Native> 
{
+            #[allow(unused)]
+            fn from_variant(variant: &Variant<'_, '_>, shred: bool) -> 
Option<Self::Native> {
                 variant.$variant_method().and_then($cast_fn)
             }
         }
     };
 }
 
-impl_primitive_from_variant!(datatypes::Int32Type, as_int32);
-impl_primitive_from_variant!(datatypes::Int16Type, as_int16);
-impl_primitive_from_variant!(datatypes::Int8Type, as_int8);
-impl_primitive_from_variant!(datatypes::Int64Type, as_int64);
-impl_primitive_from_variant!(datatypes::UInt8Type, as_u8);
-impl_primitive_from_variant!(datatypes::UInt16Type, as_u16);
-impl_primitive_from_variant!(datatypes::UInt32Type, as_u32);
-impl_primitive_from_variant!(datatypes::UInt64Type, as_u64);
-impl_primitive_from_variant!(datatypes::Float16Type, as_f16);
-impl_primitive_from_variant!(datatypes::Float32Type, as_f32);
-impl_primitive_from_variant!(datatypes::Float64Type, as_f64);
-impl_primitive_from_variant!(datatypes::Date32Type, as_naive_date, |v| {
+enum NumericKind {

Review Comment:
   These code are mainly moved from `Variant.rs`, the change here was adding 
the parameter `shred` for `from_variant` and `variant_to_unscaled_decimal`.



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