Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14181#discussion_r70772011
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -1536,21 +1536,26 @@ class Dataset[T] private[sql](
        * Returns a new Dataset by sampling a fraction of rows.
        *
        * @param withReplacement Sample with replacement or not.
    -   * @param fraction Fraction of rows to generate.
    +   * @param fraction Fraction of rows to generate and the range is 0.0 < 
`fraction` < 1.0.
        * @param seed Seed for sampling.
        *
        * @group typedrel
        * @since 1.6.0
        */
       def sample(withReplacement: Boolean, fraction: Double, seed: Long): 
Dataset[T] = withTypedPlan {
    -    Sample(0.0, fraction, withReplacement, seed, logicalPlan)()
    +    if (0.0 < fraction && fraction < 1.0) {
    --- End diff --
    
    thanks for your explanation. If so, the case `fraction>1.0` is meaningless, 
I think.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to