Skip to content

Commit ddf83dc

Browse files
gaogaotiantiandongjoon-hyun
authored andcommitted
[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 <gaogaotiantian@hotmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit d0d932a) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 5b3c274 commit ddf83dc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

python/pyspark/sql/functions/builtin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22940,7 +22940,7 @@ def shuffle(col: "ColumnOrName", seed: Optional[Union[Column, int]] = None) -> C
2294022940

2294122941
>>> import pyspark.sql.functions as sf
2294222942
>>> df = spark.sql("SELECT ARRAY(1, 20, 3, 5) AS data")
22943-
>>> df.select("*", sf.shuffle(df.data, sf.lit(123))).show()
22943+
>>> df.select("*", sf.shuffle(df.data, sf.lit(123))).show() # doctest: +SKIP
2294422944
+-------------+-------------+
2294522945
| data|shuffle(data)|
2294622946
+-------------+-------------+
@@ -22951,7 +22951,7 @@ def shuffle(col: "ColumnOrName", seed: Optional[Union[Column, int]] = None) -> C
2295122951

2295222952
>>> import pyspark.sql.functions as sf
2295322953
>>> df = spark.sql("SELECT ARRAY(1, 20, NULL, 5) AS data")
22954-
>>> df.select("*", sf.shuffle(sf.col("data"), 234)).show()
22954+
>>> df.select("*", sf.shuffle(sf.col("data"), 234)).show() # doctest: +SKIP
2295522955
+----------------+----------------+
2295622956
| data| shuffle(data)|
2295722957
+----------------+----------------+
@@ -22962,7 +22962,7 @@ def shuffle(col: "ColumnOrName", seed: Optional[Union[Column, int]] = None) -> C
2296222962

2296322963
>>> import pyspark.sql.functions as sf
2296422964
>>> df = spark.sql("SELECT ARRAY(1, 2, 2, 3, 3, 3) AS data")
22965-
>>> df.select("*", sf.shuffle("data", 345)).show()
22965+
>>> df.select("*", sf.shuffle("data", 345)).show() # doctest: +SKIP
2296622966
+------------------+------------------+
2296722967
| data| shuffle(data)|
2296822968
+------------------+------------------+
@@ -22973,7 +22973,7 @@ def shuffle(col: "ColumnOrName", seed: Optional[Union[Column, int]] = None) -> C
2297322973

2297422974
>>> import pyspark.sql.functions as sf
2297522975
>>> df = spark.sql("SELECT ARRAY(1, 2, 2, 3, 3, 3) AS data")
22976-
>>> df.select("*", sf.shuffle("data")).show() # doctest: +SKIP
22976+
>>> df.select("*", sf.shuffle("data")).show() # doctest: +SKIP
2297722977
+------------------+------------------+
2297822978
| data| shuffle(data)|
2297922979
+------------------+------------------+

0 commit comments

Comments
 (0)