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

    https://github.com/apache/spark/pull/9003#discussion_r42706392
  
    --- 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 --
    
    @holdenk @JihongMA Thanks for the suggestions! I updated `SQLQuerySuite` 
with a private `checkAnswerWithTol` helper function that solves the problem for 
the specific tests written so far. However, there are tests in 
`DataFrameAggregateSuite` that could fail if the test data ever changes - they 
too could benefit from a `checkAnswer` function that accepts a tolerance. I'm 
not sure if we can leave as is for now or perhaps the helper function should be 
added to `QueryTest` object so that it can be used in both test suites. Open to 
suggestions...


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