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



##########
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:
       Right. So to restate: allow an arrow_dplyr_query to hold a 
RecordBatchReader in .data (similar to how I extended it recently to allow 
holding an arrow_dplyr_query itself, in collapse). So you'd return an 
arrow_dplyr_query here, containing a RecordBatchReader.




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