Commits


Bryce Mecum authored and GitHub committed 20626f833be
ARROW-17439: [R] Change behavior of pull to compute instead of collect (#14330) I could use some help with a couple of things: - [x] `devtools::check` warns about `pull.ArrowTabluar` being undocumented. I `@export`ed it to stay consistent with other ArrowTabular generics defined in `arrow-tabular.R` and don't understand why checking doesn't warn on all of these. Does this one just not need exporting? <details> <summary>Relevant devtools::check() output</summary> ``` ❯ checking for missing documentation entries ... WARNING Undocumented code objects: ‘pull.ArrowTabular’ All user-level objects in a package should have documentation entries. See chapter ‘Writing R documentation files’ in the ‘Writing R Extensions’ manual. ``` </details> - [x] I found an inconsistency with `dplyr::pull` and Tables: Pulling an ungrouped Table produces a ChunkedArray whereas pulling a grouped Table produces a Table. This makes a subsequent call to `as.vector` produce an error of `Error in as.vector(x, mode) : cannot coerce type 'environment' to vector of type 'any'` <details> <summary>Example of the difference</summary> ```r > sw_table <- arrow_table(starwars) > sw_table |> + filter(height > 100) |> + group_by(homeworld) |> + pull(name) |> + class() [1] "Table" "ArrowTabular" "ArrowObject" "R6" > sw_table |> + filter(height > 100) |> + pull(name) |> + class() [1] "ChunkedArray" "ArrowDatum" "ArrowObject" "R6" ``` </details> Authored-by: Bryce Mecum <petridish@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>