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

    https://github.com/apache/spark/pull/20788#discussion_r173619046
  
    --- 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 --
    
    Hm? can't we just simply do `isinstance(p, (basestring, list, float, int))`?


---

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

Reply via email to