krlmlr commented on code in PR #14371:
URL: https://github.com/apache/arrow/pull/14371#discussion_r994041070
##########
r/R/util.R:
##########
@@ -251,3 +251,25 @@ augment_io_error_msg <- function(e, call, schema = NULL,
format = NULL) {
handle_augmented_field_misuse(msg, call)
abort(msg, call = call)
}
+
+simulate_data_frame <- function(schema) {
+
Review Comment:
In DBI, we need to infer the SQL data types from a RecordBatchReader, even
if the DBI backend is not aware of Arrow (yet).
I wonder if there should be a way to convert a schema to a zero-row Arrow
table. One way to do this is via schema -> zero-row table -> data frame. For
DBI, schema -> data frame is sufficient, but perhaps schema -> zero-row table
is easier to implemented in C++, and the table -> data frame operation is
already efficient enough for zero-row tables.
--
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]