jonkeane commented on code in PR #51658:
URL: https://github.com/apache/arrow/pull/51658#discussion_r4144955960
##########
r/R/dplyr-collect.R:
##########
@@ -65,32 +65,12 @@ pull.Dataset <- function(.data, var = -1, ..., as_vector =
getOption("arrow.pull
}
pull.RecordBatchReader <- pull.arrow_dplyr_query <- pull.Dataset
-pull.ArrowTabular <- function(x, var = -1, ..., as_vector =
getOption("arrow.pull_as_vector")) {
+pull.ArrowTabular <- function(x, var = -1, ..., as_vector =
getOption("arrow.pull_as_vector", TRUE)) {
out <- x[[vars_pull(names(x), !!enquo(var))]]
handle_pull_as_vector(out, as_vector)
}
handle_pull_as_vector <- function(out, as_vector) {
- if (is.null(as_vector)) {
Review Comment:
I did some digging (well tasked a clanker to do the digging...) to see why
we did this in the first place. Here it is for posterity (or some future
clanker to dig it up). We originally proposed to do this since there wasn't
another ergonomic way to get a chunked array, and unlike `dbplyr` where this
was originally inspired by, Arrow has an in-memory representation, so there
wasn't a _requirement_ to turn it into an R vector.
It turns out that broke dependencies so we made it opt in at the time,
though there has been consistent feedback that other engines like `data.table`
also return just a vector (and conceptually `dplyr` does this with
`data.frame`s too, it strips the outer `data.frame`ness).
I'm good with undeprecating this. Though I am slightly curious (and we
should do this in a follow on if we do), do we now have a (more) ergonomic way
to get a chunked array? is it `pull(..., as_vector=FALSE)`? or something else?
--
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]