neilconway opened a new pull request, #11321:
URL: https://github.com/apache/arrow-rs/pull/11321

   # Which issue does this PR close?
   
   - Follow-on to #11310
   
   # Rationale for this change
   
   #11310 made the `Err` path of `PrimitiveArray::into_builder` return the 
array with its original data type. Looking closer, the `Ok` path still built 
the builder with `PrimitiveBuilder::new_from_buffer`, which uses 
`T::DATA_TYPE`, so `into_builder()?.finish()` lost type parameters.
   
   These public APIs use `PrimitiveArray::into_builder` and will now behave 
correctly:
   
   - `PrimitiveArray::unary_mut` and `try_unary_mut`
   - `binary_mut` and `try_binary_mut` in arrow-arith
   - `DictionaryArray::unary_mut` and `into_primitive_dict_builder`
   - `PrimitiveRunBuilder::finish_cloned`
   
   # What changes are included in this PR?
   
   * Ensure success path of `PrimitiveArray::into_builder` also preserves type 
parameters
   * Update unit tests
   * Add new unit tests for some of the public APIs above, where the behavior 
is non-trivial
   
   # Are these changes tested?
   
   Yes; existing tests pass, new test added.
   
   # Are there any user-facing changes?
   
   No, aside from the bug fix.
   


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