superserious-dev commented on code in PR #8179:
URL: https://github.com/apache/arrow-rs/pull/8179#discussion_r2288648340


##########
parquet-variant-compute/src/variant_get/output/variant.rs:
##########
@@ -87,31 +191,103 @@ impl OutputBuilder for VariantOutputBuilder<'_> {
         _metadata: &BinaryViewArray,
         typed_value: &ArrayRef,
     ) -> arrow::error::Result<ArrayRef> {
-        // in this case dispatch on the typed_value and
-        // TODO macro'ize this using downcast! to handle all other primitive 
types
         // TODO(perf): avoid builders entirely (and write the raw variant 
directly as we know the metadata is the same)
-        let mut array_builder = VariantArrayBuilder::new(variant_array.len());

Review Comment:
   I moved this variable into the macro itself, although passing this into the 
macro would also work.



##########
parquet-variant/src/variant.rs:
##########
@@ -1242,6 +1242,12 @@ impl From<VariantDecimal16> for Variant<'_, '_> {
     }
 }
 
+impl From<half::f16> for Variant<'_, '_> {

Review Comment:
   Needed to support `DataType::Float16`.
   
   Unrelated to this issue: Seems like it would make sense to also add 
`Variant::as_f16` for symmetry.



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