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

    https://github.com/apache/spark/pull/20788#discussion_r173612651
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -437,10 +437,11 @@ def hint(self, name, *parameters):
             if not isinstance(name, str):
                 raise TypeError("name should be provided as str, got 
{0}".format(type(name)))
     
    +        allowed = [str, list, float, int]
             for p in parameters:
    -            if not isinstance(p, str):
    +            if not type(p) in allowed:
    --- End diff --
    
    I think isinstance is preferred, string can be str or unicode etc..


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to