You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/10 20:07:36 UTC

[GitHub] [arrow] nealrichardson commented on a diff in pull request #14279: ARROW-17724 [R] Allow package name prefix inside dplyr::across's .fns argument

nealrichardson commented on code in PR #14279:
URL: https://github.com/apache/arrow/pull/14279#discussion_r991607143


##########
r/R/dplyr-across.R:
##########
@@ -102,8 +102,20 @@ across_setup <- function(cols, fns, names, .caller_env, mask, inline = FALSE) {
     return(value)
   }
 
+  is_single_func <- function(fns) {
+
+    # function calls with package base::round

Review Comment:
   ```suggestion
       # function calls with package, like base::round
   ```



##########
r/R/dplyr-across.R:
##########
@@ -102,8 +102,20 @@ across_setup <- function(cols, fns, names, .caller_env, mask, inline = FALSE) {
     return(value)
   }
 
+  is_single_func <- function(fns) {
+
+    # function calls with package base::round
+    (is.call(fns) && fns[[1]] == as.name("::")) ||

Review Comment:
   Do you need to check that `is.function(fns[[3]])` or something? 



##########
r/tests/testthat/test-dplyr-across.R:
##########
@@ -268,6 +289,7 @@ test_that("ARROW-14071 - function(x)-style lambda functions are not supported",
     regexp = "Anonymous functions are not yet supported in Arrow"
   )
 
+

Review Comment:
   ```suggestion
   ```



##########
r/R/dplyr-across.R:
##########
@@ -102,8 +102,20 @@ across_setup <- function(cols, fns, names, .caller_env, mask, inline = FALSE) {
     return(value)
   }
 
+  is_single_func <- function(fns) {
+

Review Comment:
   ```suggestion
   ```



-- 
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-unsubscribe@arrow.apache.org

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