[ 
https://issues.apache.org/jira/browse/SPARK-48184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun resolved SPARK-48184.
-----------------------------------
    Fix Version/s: 3.5.2
                   4.0.0
       Resolution: Fixed

Issue resolved by pull request 46456
[https://github.com/apache/spark/pull/46456]

> Always set the seed of dataframe.sample in Client side
> ------------------------------------------------------
>
>                 Key: SPARK-48184
>                 URL: https://issues.apache.org/jira/browse/SPARK-48184
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect, PySpark
>    Affects Versions: 4.0.0, 3.5.1, 3.4.3
>            Reporter: Ruifeng Zheng
>            Assignee: Ruifeng Zheng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.5.2, 4.0.0
>
>
> the output dataframe of `sample` is not immutable in Spark Connect
>  
> In Spark Classic:
> {code:java}
> In [1]: df = spark.range(10000).sample(0.1)
> In [2]: [df.count() for i in range(10)]
> Out[2]: [1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006]{code}
>  
> In Spark Connect:
> {code:java}
> In [1]: df = spark.range(10000).sample(0.1)
> In [2]: [df.count() for i in range(10)]
> Out[2]: [969, 1005, 958, 996, 987, 1026, 991, 1020, 1012, 979]
>  {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to