jonkeane commented on a change in pull request #10724:
URL: https://github.com/apache/arrow/pull/10724#discussion_r670706539



##########
File path: r/R/dplyr-functions.R
##########
@@ -559,3 +559,24 @@ nse_funcs$wday <- function(x, label = FALSE, abbr = TRUE, 
week_start = getOption
   Expression$create("day_of_week", x, options = list(one_based_numbering = 
TRUE, week_start = week_start))
 
 }
+
+nse_funcs$if_else <- function(condition, true, false, missing = NULL){
+  # We ought to assert that the types of the true and false conditions will 
result
+  # in the same types. We can't compare the objects themselves directly because
+  # they might be expressions (that will result in a type) or R objects that 
will
+  # need to be compared to see if they are compatible with arrow types.
+  # ARROW-13186 might make this easier with a more robust way.
+  # TODO: do this ^^^
+
+  if (inherits(true, "character") || inherits(false, "character")) {
+    stop("`true` and `false` character values not yet supported in Arrow")

Review comment:
       Hmm this might be left over from above, I'll take this out (or add why 
it needs to stay) when I rebase + fix conflicts as well




-- 
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