Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/21649#discussion_r199706822
--- Diff: R/pkg/R/DataFrame.R ---
@@ -3905,6 +3905,16 @@ setMethod("rollup",
groupedData(sgd)
})
+isTypeAllowedForSqlHint <- function(x) {
+ if (is.character(x) | is.numeric(x)) {
+ TRUE
+ } else if (is.list(x)) {
+ all (sapply(x, (function (y) is.character(y) | is.numeric(y))))
+ } else {
+ FALSE
+ }
+}
+
#' hint
#'
#' Specifies execution plan hint and return a new SparkDataFrame.
--- End diff --
the concern would be if other types in python or R are going to be
translated/mapped properly to Java/Scala types, so this is probably ok
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]