pitrou commented on code in PR #14436:
URL: https://github.com/apache/arrow/pull/14436#discussion_r997145331


##########
r/R/compute.R:
##########
@@ -379,9 +379,15 @@ register_scalar_function <- function(name, fun, in_type, 
out_type,
   RegisterScalarUDF(name, scalar_function)
 
   # register with dplyr binding (enables its use in mutate(), filter(), etc.)
+  # extra step to avoid saving this execution environment in the binding,
+  # which eliminates a warning when the same binding is registered twice
+  binding_fun <- function(...) build_expr(name, ...)
+  body(binding_fun)[[2]] <- name

Review Comment:
   Hmm, what does this do? Why 2?



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