-
Notifications
You must be signed in to change notification settings - Fork 3
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
rpy2-arrow and forthcoming release of Arrow #2
Comments
Thanks for the heads-up. The easiest on my end is if there a PR I can review. The snippet of code you propose would come to replace the function of the same name here, correct? I looks like the main change on the rpy2-arrow side would be going from rarrow.ExportType(obj, schema_ptr) to schema_ptr_value = ffi.cast("uintptr_t", schema_ptr)
obj["export_to_c"](str(int(schema_ptr_value)))
What is an ExternalPointer here? An R Otherwise, why cast to obj['export_to_c'] = (schema_ptr_value.to_bytes(8, 'little')) |
Thanks for your detailed response! I agree that it's a bit of a goose chase to go from I'll prepare a PR for review when I'm back at work on Monday! |
Thanks for the PR. It will be in |
Great! Thank you! |
First, this is awesome!
In the upcoming release of Arrow scheduled a few weeks from now, we've updated the recommended way that pointers to Arrow C data structures are specified in both R and Python. As part of this change, we also updated a few internal functions to the R package (notably,
allocate_arrow_schema|array|array_stream()
) that it appears are getting used in rpy2-arrow.I'm happy to PR a fix that will work with both the old and new versions of arrow (for R) and pyarrow but wanted feedback on our change and the way we envisioned this kind of thing being done since you're one of a few main users of the C API bridge code! The PRs in which this changed were apache/arrow#11919 and apache/arrow#12011.
Would something like this make sense as a pattern for converting R Arrow arrays to Python arrow arrays? There may be a better way than
str(int(schema_ptr_value))
if rpy2 can convert cffi structures to ExternalPointers or create integer64 objects from the bit64 package.The text was updated successfully, but these errors were encountered: