ianmcook commented on a change in pull request #10327:
URL: https://github.com/apache/arrow/pull/10327#discussion_r640059959



##########
File path: r/R/dplyr-functions.R
##########
@@ -58,7 +58,16 @@ nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) 
{
 }
 
 nse_funcs$is <- function(object, class2) {
+  assert_that(is.string(class2) || inherits(class2, "DataType"))
   if (is.character(class2)) {
+    class2 <- switch(class2,
+      "utf8" = "string",
+      "float16" = "halffloat",
+      "float32" = "float",
+      "boolean" = "bool",
+      "float64" = "double",
+      class2
+    )

Review comment:
       This might be useful in the future so I broke it out into a separate 
function in 6f7c84b




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to