dragosmg commented on a change in pull request #11417:
URL: https://github.com/apache/arrow/pull/11417#discussion_r729072998



##########
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:
       Any error generated inside `case_when()` is ignored when we call 
`case_when()` inside `mutate()`, which clocks the error and issues its own 
interpretation of what is going on. Not quite sure how to surface the 
`case_when()` error information. 
   
   This is the error we would be getting from this implementation (I made a 
comment about it in the PR description):
   
   ```
   Warning: Expression case_when(!(!(!(lgl))) ~ factor(chr), TRUE ~ fct) 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to