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

Dongjoon Hyun closed SPARK-48184.
---------------------------------

> 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: 3.5.1, 3.4.3, 4.0.0
>            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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to