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

    https://github.com/apache/spark/pull/16497#discussion_r99494510
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/PercentileSuite.scala
 ---
    @@ -232,6 +358,41 @@ class PercentileSuite extends SparkFunSuite {
         assert(agg.eval(buffer) != null)
       }
     
    +  test("null and invalid values( 0 and negatives ) handling of frequency 
column") {
    --- End diff --
    
    Just make this test about testing the negative frequency case & move null & 
0 testing to the earlier test. This should be enough:
    ```scala
    val perc = new Percentile(Literal(1), Literal(0.5), Literal(-1))
    val buffer = new GenericInternalRow(2)
    agg.initialize(buffer)
    val e = intercept[SparkException](agg.update(buffer, InternalRow.empty))
    assert(e.getMessage.contains("Negative values found in "))
    ```


---
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