-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-9964] [PySpark] [SQL] PySpark DataFrameReader accept RDD of String for JSON #8444
Conversation
Test build #41583 has finished for PR 8444 at commit
|
Test build #41589 has finished for PR 8444 at commit
|
I don't think we should rename the name of the parameter since it could break compatibility. How about just changing the description? |
Test build #41611 has finished for PR 8444 at commit
|
elif isinstance(path, RDD): | ||
return self._df(self._jreader.json(path._jrdd)) | ||
else: | ||
raise Exception("path can be only string or RDD") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be https://docs.python.org/2/library/exceptions.html#exceptions.TypeError I think.
cc @davies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Test build #41668 has finished for PR 8444 at commit
|
Thanks - I've merged this in master. |
PySpark DataFrameReader should could accept an RDD of Strings (like the Scala version does) for JSON, rather than only taking a path.
If this PR is merged, it should be duplicated to cover the other input types (not just JSON).