jonkeane commented on a change in pull request #11032:
URL: https://github.com/apache/arrow/pull/11032#discussion_r722358010



##########
File path: r/R/duckdb.R
##########
@@ -111,3 +111,18 @@ duckdb_disconnector <- function(con, tbl_name) {
   })
   environment()
 }
+
+to_arrow <- function(.data) {
+  res <- DBI::dbSendQuery(dbplyr::remote_con(.data), 
dbplyr::remote_query(.data), arrow = TRUE)
+
+  # transform the source ExecNode we get below into something dataset-like 
that we can
+  # make arrow_dplyr_querys/datasets from
+  # Should be able to:
+  # * get the record batch reader from duckdb
+  # * produce the SourceNode
+  # * build an ExecPlan with that in place of the ScanNode you would have 
gotten from ExecNode_Scan
+  plan <- ExecPlan$create()

Review comment:
       Oh that's an interesting idea. Let me explore that. AFAIU we can't 
_simply_ return the RecordBatchReader, since we want to be able to continue 
building an `arrow_dplyr_query` here (unless we make all the dplyr methods 
available for RecordBatchReaders too)




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