singhpratech commented on issue #39793:
URL: https://github.com/apache/arrow/issues/39793#issuecomment-5579437493

   Adding a data point from another consumer, and an offer.
   
   Still the case in arrow 25.0.0: `allocate_arrow_array()`, 
`allocate_arrow_schema()`, `ImportArray`
   and `ExportArray` are in the namespace and not exported, and there is no 
help topic for any of
   them or for `Array$export_to_c()` / `Array$import_from_c()` 
(`tools::Rd_db("arrow")` has 133 topics
   in 25.0.0; none mentions `export_to_c`). The methods work:
   
   ```r
   a  <- Array$create(c(1, 2, 3))
   ap <- arrow:::allocate_arrow_array()      # ::: required
   sp <- arrow:::allocate_arrow_schema()
   a$export_to_c(ap, sp)
   Array$import_from_c(ap, sp)               # [1, 2, 3]
   ```
   
   but a package that hands a column to another library this way has to reach 
into the namespace with
   `:::`, which `R CMD check` flags, so the route is closed to anything bound 
for CRAN. Depending on
   nanoarrow only for two allocators is the alternative mentioned above; 
exporting the six functions
   listed here, and one `.Rd` topic for the two methods, would settle it 
without a new dependency.
   
   I am happy to open the pull request for this (exports plus a help page) if 
that is welcome.
   
   Context: the ArrowMetal R binding 
(https://github.com/singhpratech/ArrowMetal, `r/arrowmetal`)
   exchanges columns with arrow through these two methods.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to