This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new ddf83dc08f47 [SPARK-57707][PYTHON][TEST] Skip doctest for shuffle
ddf83dc08f47 is described below
commit ddf83dc08f47bd4768a05f31b11aa68cb1e65f62
Author: Tian Gao <[email protected]>
AuthorDate: Fri Jun 26 09:00:44 2026 -0700
[SPARK-57707][PYTHON][TEST] Skip doctest for shuffle
### What changes were proposed in this pull request?
Do not run doctest for shuffle.
### Why are the changes needed?
The order of the array from shuffle is random, we should not assert the
order.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Local test passed.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #56795 from gaogaotiantian/fix-shuffle-doctest.
Authored-by: Tian Gao <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit d0d932a2c065fb6c3569e3c7ae51d774a35f0046)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
python/pyspark/sql/functions/builtin.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/pyspark/sql/functions/builtin.py
b/python/pyspark/sql/functions/builtin.py
index 148e6d5184cf..432a8fe8985a 100644
--- a/python/pyspark/sql/functions/builtin.py
+++ b/python/pyspark/sql/functions/builtin.py
@@ -22940,7 +22940,7 @@ def shuffle(col: "ColumnOrName", seed:
Optional[Union[Column, int]] = None) -> C
>>> import pyspark.sql.functions as sf
>>> df = spark.sql("SELECT ARRAY(1, 20, 3, 5) AS data")
- >>> df.select("*", sf.shuffle(df.data, sf.lit(123))).show()
+ >>> df.select("*", sf.shuffle(df.data, sf.lit(123))).show() # doctest:
+SKIP
+-------------+-------------+
| data|shuffle(data)|
+-------------+-------------+
@@ -22951,7 +22951,7 @@ def shuffle(col: "ColumnOrName", seed:
Optional[Union[Column, int]] = None) -> C
>>> import pyspark.sql.functions as sf
>>> df = spark.sql("SELECT ARRAY(1, 20, NULL, 5) AS data")
- >>> df.select("*", sf.shuffle(sf.col("data"), 234)).show()
+ >>> df.select("*", sf.shuffle(sf.col("data"), 234)).show() # doctest:
+SKIP
+----------------+----------------+
| data| shuffle(data)|
+----------------+----------------+
@@ -22962,7 +22962,7 @@ def shuffle(col: "ColumnOrName", seed:
Optional[Union[Column, int]] = None) -> C
>>> import pyspark.sql.functions as sf
>>> df = spark.sql("SELECT ARRAY(1, 2, 2, 3, 3, 3) AS data")
- >>> df.select("*", sf.shuffle("data", 345)).show()
+ >>> df.select("*", sf.shuffle("data", 345)).show() # doctest: +SKIP
+------------------+------------------+
| data| shuffle(data)|
+------------------+------------------+
@@ -22973,7 +22973,7 @@ def shuffle(col: "ColumnOrName", seed:
Optional[Union[Column, int]] = None) -> C
>>> import pyspark.sql.functions as sf
>>> df = spark.sql("SELECT ARRAY(1, 2, 2, 3, 3, 3) AS data")
- >>> df.select("*", sf.shuffle("data")).show() # doctest: +SKIP
+ >>> df.select("*", sf.shuffle("data")).show() # doctest: +SKIP
+------------------+------------------+
| data| shuffle(data)|
+------------------+------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]