HyukjinKwon commented on a change in pull request #27433:
[SPARK-30682][SPARKR][SQL] Add SparkR interface for higher order functions
URL: https://github.com/apache/spark/pull/27433#discussion_r375626658
##########
File path: R/pkg/R/functions.R
##########
@@ -3348,18 +3348,14 @@ unresolved_named_lambda_var <- function(...) {
#'
#' @param fun R \code{function} (unary, binary or ternary)
#' that transforms \code{Columns} into a \code{Column}
-#' @param expected_nargs numeric a vector of the expected
-#' number of arguments. Used for validation
#' @return JVM \code{LambdaFunction} object
-create_lambda <- function(fun, expected_nargs) {
+create_lambda <- function(fun) {
as_jexpr <- function(x) callJMethod(x@jc, "expr")
# Process function arguments
parameters <- formals(fun)
nparameters <- length(parameters)
- stopifnot(nparameters %in% expected_nargs)
Review comment:
I think we might just have to add this line to each function implementation
later .. but yeah, let's do it separately after this PR to get the things in
we're all good first.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]