Github user felixcheung commented on a diff in the pull request: https://github.com/apache/spark/pull/21649#discussion_r216122804 --- 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)))) --- End diff -- I look into this more deeply, I think this style seems a bit odd, as a nit, I think this should be `all(sapply(x, function(y) { is.character(y) || is.numeric(y) } ))` think it's more readable this way. also see L2458 for an example https://github.com/apache/spark/blob/aec391c9dcb6362874736e663d435f9dd8400125/R/pkg/R/DataFrame.R#L2458
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org