You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/10/01 14:34:16 UTC

[PR] fix(arrow-array): preserve type params in `PrimitiveArray::into_builder` [arrow-rs]

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(arrow-array): preserve type params in `PrimitiveArray::into_builder` [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #11321:
URL: https://github.com/apache/arrow-rs/pull/11321


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(arrow-array): preserve type params in `PrimitiveArray::into_builder` [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #11321:
URL: https://github.com/apache/arrow-rs/pull/11321#issuecomment-5944397246

   thanks @neilconway 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(arrow-array): preserve type params in `PrimitiveArray::into_builder` [arrow-rs]

Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on PR #11321:
URL: https://github.com/apache/arrow-rs/pull/11321#issuecomment-5933640708

   cc @Jefffrey 


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org