paleolimbot opened a new pull request #11690:
URL: https://github.com/apache/arrow/pull/11690
This PR implements a binding for the `make_struct` compute function. This
function was already being called in the translation for `case_when()` but
didn't have a binding of its own. Because you can do this in dplyr too (create
a nested data frame), I mapped `tibble()` and `data.frame()` since it can be
tested using `compare_dplyr_binding()`. `StructArray$create()` is a nested call
and is probably not that useful of a translation for dplyr users (I'd never
think to use it).
Basically, you can now do this:
``` r
library(arrow, warn.conflicts = FALSE)
library(dplyr, warn.conflicts = FALSE)
df <- RecordBatch$create(a = 1, b = "two")
df %>%
mutate(df_col = tibble(a, b)) %>%
collect()
#> # A tibble: 1 × 3
#> a b df_col$a $b
#> <dbl> <chr> <dbl> <chr>
#> 1 1 two 1 two
```
--
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]