Github user zero323 commented on a diff in the pull request:
https://github.com/apache/spark/pull/17851#discussion_r114702184
--- Diff: R/pkg/R/DataFrame.R ---
@@ -3715,3 +3715,34 @@ setMethod("rollup",
sgd <- callJMethod(x@sdf, "rollup", jcol)
groupedData(sgd)
})
+
+#' hint
+#'
+#' Specifies execution plan hint on the current SparkDataFrame.
+#'
+#' @param x a SparkDataFrame.
+#' @param name a name of the hint.
+#' @param ... additional argument(s) passed to the method.
+#'
+#' @return A SparkDataFrame.
+#' @family SparkDataFrame functions
+#' @aliases hint,SparkDataFrame,character-method
+#' @rdname hint
+#' @name hint
+#' @export
+#' @examples
+#' \dontrun{
+#' df <- createDataFrame(mtcars)
+#' avg_mpg <- mean(groupBy(createDataFrame(mtcars), "cyl"), "mpg")
--- End diff --
I wanted to use different datasets to avoid aliasing and _trivially equal_
warning. It works but it is confusing (note: equi-join syntax same as in Scala
or Python would be great, and it shouldn't be that hard to add). Once we merge
`alias` this shouldn't been an issue. Since we don't run it, I can add aliases
now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]