thisisnic opened a new issue, #39446:
URL: https://github.com/apache/arrow/issues/39446
### Describe the enhancement requested
I was discussing an example of some code which raises an error; something
like:
``` r
library(arrow)
library(dplyr)
# convert mpg to kml and round
mpg_to_kml_rounded <- function(mpg){
round(mpg*0.425, 2)
}
InMemoryDataset$create(mtcars) %>%
mutate(kml = mpg_to_kml_rounded(mpg))
#> Error: Expression mpg_to_kml_rounded(mpg) not supported in Arrow
#> Call collect() first to pull data into R.
```
It's in some writing I'm doing about UDFs, but Neal pointed out that it
would be nice if we could support this case though without the full UDF
overhead. Like, simple_udf() takes a function and makes it evaluate in the
binding environment, so that in this example, `round()` evaluates to the
version we have in our binding environment.
### Component(s)
R
--
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]