albertlockett opened a new issue, #7662:
URL: https://github.com/apache/arrow-rs/issues/7662

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   In https://github.com/apache/arrow-rs/pull/7611 we added a new method to the 
dictionary builders called `try_new_from_builder` that allows creating a new 
builder with the same values, but a different type for the dictionary keys.
   
   This method uses the `PrimitiveArray::try_unary` method to do the casting, 
but when casting infallible types (e.g. going from u8 -> u16 keys), it would 
probably be faster to use `PrimitiveArray::unary_mut`.
   
   We should improve the implementation of `try_new_from_builder` to use 
`unary_mut` where possible. It might also be good to have add benchmark for 
this method as part of this work, so we could measure if there really is a 
performance improvement.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   
   Discussion https://github.com/apache/arrow-rs/pull/7611/files#r2143611512


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