You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/02/21 08:13:00 UTC

[jira] [Commented] (SPARK-38271) PoissonSampler may generate more rows than MaxRows

    [ https://issues.apache.org/jira/browse/SPARK-38271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495374#comment-17495374 ] 

Apache Spark commented on SPARK-38271:
--------------------------------------

User 'zhengruifeng' has created a pull request for this issue:
https://github.com/apache/spark/pull/35593

> PoissonSampler may generate more rows than MaxRows
> --------------------------------------------------
>
>                 Key: SPARK-38271
>                 URL: https://issues.apache.org/jira/browse/SPARK-38271
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: zhengruifeng
>            Priority: Major
>
> {code:java}
> scala> val df = spark.range(0, 1000)
> df: org.apache.spark.sql.Dataset[Long] = [id: bigint]
> scala> df.count
> res0: Long = 1000
> scala> df.sample(true, 0.999999, 10).count
> res1: Long = 1004
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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