-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42570][CONNECT][PYTHON] Fix DataFrameReader to use the default source #40166
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
Conversation
| actual = self.spark.read.load(path=tmpPath) | ||
| self.assertEqual(sorted(df.collect()), sorted(actual.collect())) | ||
| self.spark.sql("SET spark.sql.sources.default=" + defaultDataSourceName) | ||
| try: |
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.
The changes in this file is to make the cleanup done properly.
HyukjinKwon
left a comment
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.
Nice, thanks Takuya
|
LGTM What is the default source BTW? |
connector/connect/common/src/main/protobuf/spark/connect/relations.proto
Show resolved
Hide resolved
If format is not set, the value from SQL conf 'spark.sql.sources.default' will be used. |
|
Merging. |
… source ### What changes were proposed in this pull request? Fixes `DataFrameReader` to use the default source. ### Why are the changes needed? ```py spark.read.load(path) ``` should work and use the default source without specifying the format. ### Does this PR introduce _any_ user-facing change? The `format` doesn't need to be specified. ### How was this patch tested? Enabled related tests. Closes #40166 from ueshin/issues/SPARK-42570/reader. Authored-by: Takuya UESHIN <ueshin@databricks.com> Signed-off-by: Herman van Hovell <herman@databricks.com> (cherry picked from commit ad35f35) Signed-off-by: Herman van Hovell <herman@databricks.com>
… source ### What changes were proposed in this pull request? Fixes `DataFrameReader` to use the default source. ### Why are the changes needed? ```py spark.read.load(path) ``` should work and use the default source without specifying the format. ### Does this PR introduce _any_ user-facing change? The `format` doesn't need to be specified. ### How was this patch tested? Enabled related tests. Closes apache#40166 from ueshin/issues/SPARK-42570/reader. Authored-by: Takuya UESHIN <ueshin@databricks.com> Signed-off-by: Herman van Hovell <herman@databricks.com> (cherry picked from commit ad35f35) Signed-off-by: Herman van Hovell <herman@databricks.com>
What changes were proposed in this pull request?
Fixes
DataFrameReaderto use the default source.Why are the changes needed?
should work and use the default source without specifying the format.
Does this PR introduce any user-facing change?
The
formatdoesn't need to be specified.How was this patch tested?
Enabled related tests.