jonkeane commented on a change in pull request #11417:
URL: https://github.com/apache/arrow/pull/11417#discussion_r729064629
##########
File path: r/R/dplyr-functions.R
##########
@@ -915,6 +915,9 @@ nse_funcs$case_when <- function(...) {
if (!nse_funcs$is.logical(query[[i]])) {
abort("Left side of each formula in case_when() must be a logical
expression")
}
+ if (inherits(value[[i]], "try-error")) {
+ abort("There is an error in the right side of the case_when() formula")
Review comment:
Hmm, then we might need to do a bit more here. what does the warning
look like when that happens?
For the pure-mutate version, we get a clear indicator of _what_ is not
supported so that the developer could address it:
```
> library(dplyr, warn.conflicts = FALSE)
> ds <- InMemoryDataset$create(mtcars)
> ds %>%
+ mutate(fct = factor(gear)) %>%
+ collect()
Warning: Expression factor(gear) not supported in Arrow; pulling data into R
...
```
I would hope that we would get something similar here too, if possible.
--
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]