superserious-dev commented on code in PR #8179: URL: https://github.com/apache/arrow-rs/pull/8179#discussion_r2294220317
########## parquet-variant-compute/src/variant_get/output/variant.rs: ########## @@ -44,40 +85,103 @@ impl OutputBuilder for VariantOutputBuilder<'_> { _value_field: &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()); match typed_value.data_type() { + DataType::Int8 => { + cast_partially_shredded_primitive!( + typed_value, + variant_array, + Int8Type, + DataType::Int8 + ) + } Review Comment: I did an experiment with messing up the formatting of the file and running `cargo fmt` manually. It modifies the file back to it's current state. I don't have any `rustfmt.toml` customizations, so I think this is the formatted result. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org