[ 
https://issues.apache.org/jira/browse/ARROW-11120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17257843#comment-17257843
 ] 

Laurent commented on ARROW-11120:
---------------------------------

I looked at it. It seems that all all that is needed it is to:
 # get the `shared_ptr` from a Arrow object (e.g., `pyarrow_unwrap_array` 
available with `pyarrow`'s Cython interface)
 # wrap this `shared_ptr` into an R C-level "External Pointer".
 # load the R package "arrow" in the embedded R
 # create an new instance of the matching class using the "External Pointer" 
(e.g., `Array$new(external_ptr)`)

The only possible difficulty is to either:
 * resolve how to get Cython and `cffi` to cooperate (rpy2 is using `cffi`)
 * figure out how to get functions like `pyarrow_unwrap_array` easy to call 
from a C-extension

> [Python][R] Prove out plumbing to pass data between Python and R using rpy2
> ---------------------------------------------------------------------------
>
>                 Key: ARROW-11120
>                 URL: https://issues.apache.org/jira/browse/ARROW-11120
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python, R
>            Reporter: Wes McKinney
>            Priority: Major
>
> Per discussion on the mailing list, we should see what is required (if 
> anything) to be able to pass data structures using the C interface between 
> Python and R from the perspective of the Python user using rpy2. rpy2 is sort 
> of the Python version of reticulate. Unit tests will then validate that it's 
> working



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

Reply via email to