alamb commented on code in PR #7912: URL: https://github.com/apache/arrow-rs/pull/7912#discussion_r2202887789
########## parquet-variant/src/builder.rs: ########## @@ -1916,6 +1989,80 @@ mod tests { assert_eq!(metadata.num_field_names(), 3); } + /// Test reusing buffers with nested objects + #[test] + fn test_with_existing_buffers_nested() { Review Comment: > If you apply this diff, it should give you what you need: https://github.com/apache/arrow-rs/pull/7914. Thank you @friendlymatthew -- that looks great ❤️ -- I left a few comments > I don't love that we need to use a builder to reencode the object/list. I'm going to spend some time thinking about a more elegant solution. I think potentially a more performant solution would be to optimize https://github.com/apache/arrow-rs/pull/7914 to copy the Variant bytes directly and then update the field_ids. However, that will get tricky I think if the field_ids in the variant under construction are different sizes than the old one. I suggest we start with the simple thing (what you have) and then we can optimize if/when we have benchmarks that show it would help -- 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