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 2020/12/20 07:01:04 UTC

[GitHub] [arrow] jorgecarleitao commented on pull request #8973: ARROW-10989: [Rust] Iterate primitive buffers by slice

jorgecarleitao commented on pull request #8973:
URL: https://github.com/apache/arrow/pull/8973#issuecomment-748571786


   Hi @tyrelr , that is a good idea.
   
   I am a reticent in introducing yet another public method to the `PrimitiveArray`, as it is already a bit confusing which one to use (we have `value_slice`, `raw_values`, `values` and `value`).
   
   Originally, I was thinking in solving this mess via an iterator of values, however, you have a better idea: just offer a slice of `T`.
   
   In which case, this PR should be bolder: replace `value_slice`, `raw_values`, `values` and (if you feel confident) `value` by a single method, `values`, whose implementation is what you wrote for `raw_values_slice`.
   
   In other words, instead of introducing yet another endpoint, we simplify the existing API with something simpler (and safer, as many of the methods are actually `unsafe` and cause undefined behavior).
   
   How would that sound to you?


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

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