You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/30 14:13:20 UTC

[GitHub] [arrow-rs] tustvold opened a new issue, #1979: Implement Into for T: Array

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

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   The array implementations are just strongly typed wrappers around an `ArrayData`. It therefore makes sense that the conversion can be performed cheaply. Currently the only way to do this uses `Array::data` and `ArrayData::clone`, the latter of which is not especially cheap.
   
   **Describe the solution you'd like**
   
   I would like all `T: Array` to `impl Into<ArrayData>`. Additionally these implementations should provide an `into_data` member function to aid in type inference.
   
   ```
   fn into_data(self) -> ArrayData {
     self.into()
   }
   ```
   
   **Describe alternatives you've considered**
   
   We could not do this, but it is fairly common to see `array.data().clone()` which just seems unnecessary
   


-- 
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.apache.org

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


[GitHub] [arrow-rs] tustvold closed issue #1979: Implement Into for T: Array

Posted by GitBox <gi...@apache.org>.
tustvold closed issue #1979: Implement Into<ArrayData> for T: Array
URL: https://github.com/apache/arrow-rs/issues/1979


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