Github user felixcheung commented on a diff in the pull request: https://github.com/apache/spark/pull/19557#discussion_r146757193 --- Diff: R/pkg/R/DataFrame.R --- @@ -3249,9 +3249,12 @@ setMethod("as.data.frame", #' @note attach since 1.6.0 setMethod("attach", signature(what = "SparkDataFrame"), - function(what, pos = 2, name = deparse(substitute(what)), warn.conflicts = TRUE) { - newEnv <- assignNewEnv(what) - attach(newEnv, pos = pos, name = name, warn.conflicts = warn.conflicts) + function(what, pos = 2L, name = deparse(substitute(what), backtick = FALSE), + warn.conflicts = TRUE) { + args <- as.list(environment()) # capture all parameters - this must be the first line + newEnv <- assignNewEnv(args$what) + args$what <- newEnv + do.call(attach, args) --- End diff -- calling attach this way to avoid it getting flagged...
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org