alamb commented on code in PR #7911:
URL: https://github.com/apache/arrow-rs/pull/7911#discussion_r2216344784
##########
parquet-variant-compute/src/from_json.rs:
##########
@@ -41,10 +40,10 @@ pub fn batch_json_string_to_variant(input: &ArrayRef) ->
Result<VariantArray, Ar
// The subfields are expected to be non-nullable according to the
parquet variant spec.
variant_array_builder.append_null();
} else {
- let mut vb = VariantBuilder::new();
+ let mut vb = variant_array_builder.variant_builder();
+ // parse JSON directly to the variant builder
json_to_variant(input_string_array.value(i), &mut vb)?;
- let (metadata, value) = vb.finish();
Review Comment:
The whole point if this PR is to avoid this copy / append
--
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]