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/02 03:38:25 UTC
[GitHub] [spark] HyukjinKwon commented on pull request #39331: [WIP] [SPARK-41659] [CONNECT] Enable doctests in pyspark.sql.connect.readwriter
HyukjinKwon commented on PR #39331:
URL: https://github.com/apache/spark/pull/39331#issuecomment-1368632964
@zhengruifeng i think we should cover dictionary cases too (like we did in https://github.com/apache/spark/pull/39313):
```
Failed example:
with tempfile.TemporaryDirectory() as d:
# Write a DataFrame into a JSON file
spark.createDataFrame(
[{"age": 100, "name": "Hyukjin Kwon"}]
).write.mode("overwrite").format("json").save(d)
# Read the JSON file as a DataFrame.
spark.read.format('json').load(d).show()
Expected:
+---+------------+
|age| name|
+---+------------+
|100|Hyukjin Kwon|
+---+------------+
Got:
+---+------------+
| _1| _2|
+---+------------+
|100|Hyukjin Kwon|
+---+------------+
```
A lot of test fails because of that
--
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