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

Handle ALTREP classes defined in other packages #231

Merged
merged 2 commits into from
May 3, 2024

Conversation

yutannihilation
Copy link
Owner

Add these functions:

  • get_altrep_class_name()
  • get_altrep_package_name()
  • get_altrep_body_mut_unchecked()
  • get_altrep_body_ref_unchecked()

This should enable zero-copy conversion between ALTREP types like Apache Arrow owns. That said, I'm not sure if this is a valid way. Since R_altrep_class_t is not exposed, we have no choice to check the class name and the package name, but I'm not sure if it's enough.

cf. https://github.com/apache/arrow-nanoarrow/blob/main/r/src/altrep.h

@yutannihilation yutannihilation merged commit 7808dbb into main May 3, 2024
15 checks passed
@yutannihilation yutannihilation deleted the external-altrep branch May 3, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant