BITree2004 opened a new pull request, #50049:
URL: https://github.com/apache/arrow/pull/50049

   ### Rationale for this change
   
   BinaryBuilder accepted a DataType in its constructor but discarded it, so 
finishing through ArrayBuilder::Finish() always produced a plain binary array 
instead of preserving the supplied type, such as an extension type backed by 
binary storage.
   
   ### What changes are included in this PR?
   
   - Store the supplied DataType in BaseBinaryBuilder.
   - Use the stored type for BinaryBuilder and LargeBinaryBuilder output.
   - Add a regression test covering BinaryBuilder with a binary-backed 
extension type.
   
   ### Are these changes tested?
   
   Yes.
   
   ```bash
   ninja -C cpp/build arrow-array-test
   ./cpp/build/release/arrow-array-test 
--gtest_filter=BinaryBuilder.PreservesDataType
   ./cpp/build/release/arrow-array-test


-- 
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]

Reply via email to