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/02/10 15:26:56 UTC

[GitHub] [arrow-rs] alamb opened a new issue #1298: More ergonomic / idiomatic primitive array creation from iterators

alamb opened a new issue #1298:
URL: https://github.com/apache/arrow-rs/issues/1298


   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   I want to write this to create an array without nulls (as I am used to using this syntax all over rust codebases): 
   
   ```rust
   let value_data: Int8Array = [10_i8, 11, 12, 13, 14, 15, 16, 17]
     .into_iter()
     .collect();
   ```
   
   
   
   However, i have to write this (add a `Some` so it becomes an `Option`) which is annoying.
   
   ```rust
   let value_data: Int8Array = [10_i8, 11, 12, 13, 14, 15, 16, 17]
     .into_iter()
     .map(Some)
     .collect();
   ```
   
   Note you can write this, but that is not as idomatic
   ```rust
           let value_data = Int8Array::from_iter_values([10_i8, 11, 12, 13, 14, 15, 16, 17]);
   ```
   
   
   **Describe the solution you'd like**
   But it would be more ergonomic to be able to just use the collect syntax
   
   Namely I want  to write this and have it work:
   
   ```rust
   let value_data: Int8Array = [10_i8, 11, 12, 13, 14, 15, 16, 17]
     .into_iter()
     .collect();
   ```
   
   Also, for BooleanArray and StringArray
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   


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



[GitHub] [arrow-rs] alamb closed issue #1298: More ergonomic / idiomatic primitive array creation from iterators

Posted by GitBox <gi...@apache.org>.
alamb closed issue #1298:
URL: https://github.com/apache/arrow-rs/issues/1298


   


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