alamb opened a new pull request, #9305: URL: https://github.com/apache/arrow-rs/pull/9305
# 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. --> - Part of #9298 # Rationale for this change While reviewing https://github.com/apache/arrow-rs/pull/9303 from @Dandandan I noticed that using the primitive builders to create arrays was non ideal for two reasons: 1. It drops/recreates a `DataType` (which while not super expensive is total overhead) 2. It uses ArrayData (which allocates a `Vec` unecessairly) # What changes are included in this PR? 1. Update `finish` and `finish_cloned` to avoid using ArrayData 2. Introduce `build` which consumes the builder This is similar to the build methods added to the other builders here - https://github.com/apache/arrow-rs/pull/9155 # Are these changes tested? Yes by CI and new doc tests # Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. --> -- 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]
