codephage2020 commented on code in PR #7945: URL: https://github.com/apache/arrow-rs/pull/7945#discussion_r2212338090
########## parquet-variant-compute/src/variant_array.rs: ########## @@ -88,7 +90,10 @@ impl VariantArray { )); }; // Ensure the StructArray has a metadata field of BinaryView - let Some(metadata_field) = inner.fields().iter().find(|f| f.name() == "metadata") else { + + let cloned = inner.clone(); Review Comment: Yes, that's correct. The final result is the same. However, what I want to say is that we can perform the clone operation after the verification. These verification and value retrieval operations may fail. If we place the clone operation at the end, we can avoid unnecessary operations. -- 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