Github user huaxingao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21649#discussion_r199338975
  
    --- 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 --
    
    Scala doesn't have a doc on hint type supported. Actually it has type Any 
in the signature. 
    ```
    def hint(name: String, parameters: Any*): Dataset[T]
    ```
    I was trying to follow the python implementation in #20788, which allows 
```basestring, list, float, int, dict.```Now I am kind of suspect if this is 
the right behavior. Should we allow any types? 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to