Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/13036#discussion_r62978732
--- 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 --
ah, got it. I just mean from SQL parser.
Similarly, as the unicode column name will be encoded by
`name.encode('utf-8')`, it is now a `str` instance. In other words, the schema
still stores column names as `str`. However, this change is allowing unicode
input as `col`. I think there will be mismatching.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]