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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]