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

    https://github.com/apache/spark/pull/18387#discussion_r123637673
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 
---
    @@ -457,6 +457,29 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
           3, 17, 27, 58, 62)
       }
     
    +  test("sample fraction should not be negative with replacement") {
    +    val data = sparkContext.parallelize(1 to 2, 1).toDS()
    +    val errMsg = intercept[IllegalArgumentException] {
    +      data.sample(withReplacement = true, -0.1, 0)
    +    }
    +    assert(errMsg.getMessage.startsWith("requirement failed: "))
    --- End diff --
    
    ` val errMsg =  .. .getMessage`
    
    `errMsg.contains`


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to