You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/15 20:03:46 UTC

[GitHub] [arrow] jonkeane commented on pull request #10536: ARROW-12940: [R] Expose C interface as R6 methods

jonkeane commented on pull request #10536:
URL: https://github.com/apache/arrow/pull/10536#issuecomment-861794436


   For each of `Array`, `RecordBatch`, `RecordBatchReader` (+ `RecordBatchReaderStream`), `Field`, `Schema`, and `DataType` I have added an `export_to_c()` method (which takes a pointer or pointers and must be called from an instantiation of an object (e.g. `arr <- Array$create(); arr$export_to_c(...)`)) and uses `Export*` to expose the object and an `import_from_c()` method (which takes a pointer or pointers and will result in an instantiation of an object of that type (e.g. `new_array <- Array$import_from_c(...)`)).
   
   This should cover all of the types that are available in the C-interface (though I might have missed one). One thing that I haven't done yet is add methods for `Table`s. The py to R and R to py code does something else there, though [I didn't quite follow how it transforms tables so that they can be transported](https://github.com/apache/arrow/blob/master/r/R/python.R#L90-L104). I'm not sure if we need to add that as a method though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org