You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/24 20:20:07 UTC

[GitHub] [arrow] wjones127 commented on a diff in pull request #14461: ARROW-15460: [R] Add as.data.frame.Dataset method

wjones127 commented on code in PR #14461:
URL: https://github.com/apache/arrow/pull/14461#discussion_r1003729797


##########
r/R/table.R:
##########
@@ -330,10 +330,22 @@ as_arrow_table.RecordBatchReader <- function(x, ...) {
   x$read_table()
 }
 
+#' @rdname as_arrow_table
+#' @export
+as_arrow_table.Dataset <- function(x, ...) {
+  Scanner$create(x)$ToTable()
+}

Review Comment:
   I know it's trivial, but could we add a quick test for this and `as.data.frame.Dataset`?



##########
r/R/metadata.R:
##########
@@ -77,7 +77,7 @@ apply_arrow_r_metadata <- function(x, r_metadata) {
         trace <- trace_back()
         # TODO: remove `trace$calls %||% trace$call` once rlang > 0.4.11 is released
         in_dplyr_collect <- any(map_lgl(trace$calls %||% trace$call, function(x) {
-          grepl("collect.arrow_dplyr_query", x, fixed = TRUE)[[1]]
+          grepl("collect\\.([aA]rrow|Dataset)", x)[[1]]

Review Comment:
   Is this codepath covered by a test?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org