This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ca1e3e7371ec [MINOR][PYTHON][TESTS] Skip the doctest of toJSON
ca1e3e7371ec is described below
commit ca1e3e7371ec36719886bbac18bde75203a57020
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Wed Feb 4 11:22:05 2026 +0800
[MINOR][PYTHON][TESTS] Skip the doctest of toJSON
### What changes were proposed in this pull request?
Skip the doctest of toJSON
### Why are the changes needed?
to fix
https://github.com/apache/spark/actions/runs/21184469603/job/60935135430
### Does this PR introduce _any_ user-facing change?
`toJSON` returns RDD in classic and DF in connect, this doctest fails with
connect
### How was this patch tested?
will monitor the scheduled job
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #54127 from zhengruifeng/fix_doctest_tojson.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
python/pyspark/sql/dataframe.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 5dd1f0ba4894..161651b78a91 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -270,7 +270,7 @@ class DataFrame:
Examples
--------
>>> df = spark.createDataFrame([(2, "Alice"), (5, "Bob")],
schema=["age", "name"])
- >>> df.toJSON().first()
+ >>> df.toJSON().first() # doctest: +SKIP
'{"age":2,"name":"Alice"}'
"""
...
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]