ianmcook commented on a change in pull request #11904: URL: https://github.com/apache/arrow/pull/11904#discussion_r773454510
########## File path: r/R/dplyr-funcs.R ########## @@ -0,0 +1,128 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +#' @include expression.R +NULL + + +#' Register compute bindings +#' +#' The `register_binding()` and `register_binding_agg()` functions +#' are used to populate a list of functions that operate on (and return) +#' Expressions. These are the basis for the `.data` mask inside dplyr methods. +#' +#' @section Writing bindings: +#' When to use `build_expr()` vs. `Expression$create()`? +#' +#' Use `build_expr()` if you need to +#' - map R function names to Arrow C++ functions +#' - wrap R inputs (vectors) as Array/Scalar +#' +#' `Expression$create()` is lower level. Most of the bindings use it +#' because they manage the preparation of the user-provided inputs +#' and don't need or don't want to the automatic conversion of R objects +#' to [Scalar]. +#' +#' @param fun_name A function name in the form `"function"` or Review comment: ```suggestion #' @param fun_name A string containing a function name in the form `"function"` or ``` -- 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]
