nealrichardson commented on code in PR #14371:
URL: https://github.com/apache/arrow/pull/14371#discussion_r994577812


##########
r/src/table.cpp:
##########
@@ -302,6 +303,27 @@ std::shared_ptr<arrow::Table> Table__from_record_batches(
   return tab;
 }
 
+// [[arrow::export]]
+std::shared_ptr<arrow::Table> Table__from_schema(SEXP schema_sxp) {

Review Comment:
   This is great! A couple of thoughts for how to expose this:
   
   1. We can use this in `Table$create(schema = schema)`, i.e. where 
`length(dots) == 0 && inherits(schema, "Schema")`. Currently we error if `...` 
is empty.
   2. This also can be the `as_arrow_table.Schema` method
   3. Can also add `as.data.frame.Schema`, which is essentially what 
`simulate_data_frame()` is now. 
   
   Doing these would solve the issue of exporting it for use in other packages.



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