Github user k-yokoshi commented on a diff in the pull request: https://github.com/apache/spark/pull/13036#discussion_r82816487 --- Diff: python/pyspark/sql/dataframe.py --- @@ -470,7 +470,7 @@ def sampleBy(self, col, fractions, seed=None): +---+-----+ """ - if not isinstance(col, str): + if not isinstance(col, basestring): --- End diff -- I agree with you. There is no problem caused by allowing unicode here. As you mentioned, it's better to handle `'a'` and `u'a'` because there are few cases that unicode is passed. (e.g. when `__future__.unicode_literals` is imported in Python 2.)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org