You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2023/01/13 08:39:47 UTC
[GitHub] [spark] HyukjinKwon commented on a diff in pull request #39552: [SPARK-42001][CONNECT][PYTHON][TESTS] Enable two schema related reader tests
HyukjinKwon commented on code in PR #39552:
URL: https://github.com/apache/spark/pull/39552#discussion_r1069088765
##########
python/pyspark/sql/tests/test_readwriter.py:
##########
@@ -53,16 +53,23 @@ def test_save_and_load(self):
)
self.assertEqual(sorted(df.collect()), sorted(actual.collect()))
- defaultDataSourceName = self.spark.conf.get(
- "spark.sql.sources.default", "org.apache.spark.sql.parquet"
- )
- self.spark.sql("SET spark.sql.sources.default=org.apache.spark.sql.json")
- 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:
Review Comment:
Hm, let's avoid such changes like this because of inherited test cases. I think `test_readwriter` itself should make sense itself alone (with regular PySpark alone).
To do this, one thing we can do is to split the test separately. E.g., https://github.com/apache/spark/commit/56f8dccd6532aaebf9f2838be6673d5c75c6df79
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org