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/07/06 13:50:57 UTC

[GitHub] [arrow] dragosmg commented on a diff in pull request #13160: ARROW-14575: [R] Allow functions with `pkg::` prefixes

dragosmg commented on code in PR #13160:
URL: https://github.com/apache/arrow/pull/13160#discussion_r914864833


##########
r/R/arrow-datum.R:
##########
@@ -103,10 +103,10 @@ Ops.ArrowDatum <- function(e1, e2) {
 #' @export
 Math.ArrowDatum <- function(x, ..., base = exp(1), digits = 0) {
   switch(.Generic,
-    abs = ,
-    sign = ,
-    floor = ,
-    ceiling = ,
+    abs = eval_array_expression("abs_checked", x),
+    sign = eval_array_expression("sign", x),
+    floor = eval_array_expression("floor", x),
+    ceiling = eval_array_expression("ceil", x),

Review Comment:
   For example, for `abs`, I think the `Math.ArrowDatum` fails because it cannot find it, since it's been renamed to `base::abs()` in the `.unary_function_map`. This ☝🏻 was my work around to make sure `abs` is mapped to `abs_checked`.



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