klion26 opened a new pull request, #7987: URL: https://github.com/apache/arrow-rs/pull/7987
This commit will reuse parent buffer for ListBuilder, so that it doesn't need to copy the buffer when finishing the builder. # Which issue does this PR close? We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. - Closes #7977 . # Rationale for this change This pr wants to avoid the extra buffer allocation in ListBuilder. # What changes are included in this PR? - Reuse the parent's buffer when creating a `ListBuilder`, all contents will be written to the buffer of the parent directly - When `ListBuilder::finish`, we'll fill the header for the current list in the parent's buffer - Will roll back the value of has written into the parent's buffer in `drop` if `ListBuilder::finish` has not been called. # Are these changes tested? The change was covered by existing tests mainly `test_nested_list_with_heterogeneous_fields_for_buffer_reuse` # Are there any user-facing changes? No -- 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