liamzwbao commented on code in PR #8768:
URL: https://github.com/apache/arrow-rs/pull/8768#discussion_r2496629757


##########
parquet-variant-compute/src/variant_to_arrow.rs:
##########
@@ -60,6 +61,9 @@ pub(crate) enum PrimitiveVariantToArrowRowBuilder<'a> {
     TimestampNanoNtz(VariantToTimestampNtzArrowRowBuilder<'a, 
datatypes::TimestampNanosecondType>),
     Time(VariantToPrimitiveArrowRowBuilder<'a, 
datatypes::Time64MicrosecondType>),
     Date(VariantToPrimitiveArrowRowBuilder<'a, datatypes::Date32Type>),
+    Utf8(VariantToUtf8ArrowRowBuilder<'a, i32>),
+    LargeUtf8(VariantToUtf8ArrowRowBuilder<'a, i64>),
+    Binary(VariantToBinaryArrowRowBuilder<'a>),

Review Comment:
   I think the confusion comes from `variant_get` and `shred_variant` sharing 
`variant_to_arrow`.
   
   - `variant_get` should allow casting to any valid Arrow type.
   - `shred_variant` should follow the shredding spec (only Parquet primitives 
+ list/struct).
   
   My advice:
   - Add type checks in `shred_variant` to enforce the spec.
   - Keep `variant_to_arrow` a **pure** converter (the inverse of 
`arrow_to_variant`).
   
   Created an issue #8795 to keep track of.
   
   Overall, no blockers from my side. I’ll submit a follow-up PR to fix the 
docs. It would also be great to add support for `LargeBinary` and `BinaryView` 
either in this PR or a follow-up.
   



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