Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/20788#discussion_r174367197
--- 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_types = (basestring, list, float, int)
--- End diff --
I think the point is that `basestring` is in python2
https://docs.python.org/2/library/functions.html#basestring
but not in python 3
https://docs.python.org/3.0/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit
we should test this....
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]