alamb opened a new pull request, #6966: URL: https://github.com/apache/arrow-rs/pull/6966
# Which issue does this PR close? - Part of https://github.com/apache/arrow-rs/issues/3287 # Rationale for this change ArrayDataBuilder has two options today: 1. Validate the data 2. Ensure buffer alignment There are three methods today: 1. [`build()`](https://docs.rs/arrow/latest/arrow/array/struct.ArrayDataBuilder.html#method.build) that does validates but does not ensure alignment 1. [`build_unchecked()`](https://docs.rs/arrow/latest/arrow/array/struct.ArrayDataBuilder.html#method.build) that neither validates nor ensures alignment 2. [`build_aligned()`](https://docs.rs/arrow/latest/arrow/array/struct.ArrayDataBuilder.html#method.build_aligned) that validates and ensures alignment @totoroyyb proposed to add the other combination (no validation but aligned) in https://github.com/apache/arrow-rs/pull/6938 as a fourth function `build_aligned_unchecked` Instead of a fourth function I think we can use builder flags for a better API # What changes are included in this PR? 1. Add `validate` and `align` fields to ArrayBuilder 2. Add getters/setters for those fields 3. Deprecate `build_aligned` in favor of those flags Note I chose not to deprecate `build_unchecked` as that is used in more places in the code so deprecating it would be more API churn # Are there any user-facing changes? New APIs and deprecated APIs in ArrayDataBuilder <!-- 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]
