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

    https://github.com/apache/spark/pull/9003#discussion_r42717893
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala ---
    @@ -221,4 +221,40 @@ class DataFrameAggregateSuite extends QueryTest with 
SharedSQLContext {
           emptyTableData.agg(sumDistinct('a)),
           Row(null))
       }
    +
    +  test("moments") {
    +    checkAnswer(
    +      testData2.agg(skewness('a)),
    +      Row(0.0))
    +
    +    checkAnswer(
    --- End diff --
    
    I think sharing `checkAnswerWithTol` as a helper function in `QueryTest` 
sounds like a good plan, I'm not super sure on the name (since checkAnswer 
works with an expected Row and the signature is a bit further off than just 
adding a tolerance param), but it seems probably ok with the current name.


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