Tyrel Rink created ARROW-11546:
----------------------------------

             Summary: [Rust][Experiment][WIP] Experiment with a TypedArray trait
                 Key: ARROW-11546
                 URL: https://issues.apache.org/jira/browse/ARROW-11546
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Rust
            Reporter: Tyrel Rink
            Assignee: Tyrel Rink


A few of the arrow kernels rely on macros to iterate over values using a common 
".value()" function, but:
* this is unsafe on some array types (string, binary), but unsafe on other 
array types (primitive)
* this forces iteration by index, which does not always optimize away 
bounds-checking (at least in the binary case)

This PR is an experiment with a TypedArray trait, which provides access to 
array values (along with associated types describing those values).  This will 
NOT remove the need for downcasting, as the associated types aren't 
object-safe.  But it should be sufficient to allow simple processing of values 
from multiple array types using a generic function instead of a macro.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to