jonkeane commented on a change in pull request #11417: URL: https://github.com/apache/arrow/pull/11417#discussion_r729089782
########## 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: Ah ok, that's better than what I was fearing (that we were getting something like "Warning: There is an error in the right side of the case_when() formula not supported in Arrow; pulling data into R"). I think this is ok as it is — it would be _nice_ to highlight which part fo that expression is problematic, but that's a lot more complicated (and not even supported in the standard flow anyway, see below) ``` > ds %>% + mutate(fct = is.logical(1 + factor(gear))) Warning: Expression is.logical(1 + factor(gear)) not supported in Arrow; pulling data into 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org