Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust][Experiment][WIP] Experiment with a TypedArray trait #179

Closed
alamb opened this issue Apr 26, 2021 · 1 comment
Closed

[Rust][Experiment][WIP] Experiment with a TypedArray trait #179

alamb opened this issue Apr 26, 2021 · 1 comment
Labels
arrow Changes to the arrow crate

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-11546

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.

@alamb alamb added the arrow Changes to the arrow crate label Apr 26, 2021
@tustvold
Copy link
Contributor

Closed by #2133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

No branches or pull requests

2 participants