ianmcook commented on a change in pull request #9805:
URL: https://github.com/apache/arrow/pull/9805#discussion_r602308196
##########
File path: r/R/dplyr.R
##########
@@ -279,6 +280,19 @@ arrow_eval <- function (expr, mask) {
}
invisible(structure(msg, class = "try-error", condition = e))
})
+ # Check that the evaluated expression has one of the expected classes or
types
+ if (!inherits(out, c("array_expression", "Expression", "try-error")) &&
+ !typeof(out) %in% c("logical", "integer", "double", "character",
"NULL")) {
Review comment:
I hadn't realized you can do this
```
y <- Array$create(c(1,2,3))
tibble::tibble(x = c("a","b","c")) %>% Table$create() %>% mutate(y)
```
Very cool. So yes the class list would need to be expanded.
I'll check again, but I don't think we have any tests that exercise that,
because adding the checks above didn't cause any tests to fail.
--
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:
[email protected]