Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/9003#discussion_r42790961
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala ---
@@ -168,6 +191,28 @@ object QueryTest {
return None
}
+ /**
+ * Runs the plan and makes sure the answer is within absTol of the
expected result.
+ * @param actualAnswer the actual result in a [[Row]].
+ * @param expectedAnswer the expected result in a[[Row]].
+ * @param absTol the absolute tolerance between actual and expected
answers.
+ */
+ protected def checkAggregatesWithTol(actualAnswer: Row, expectedAnswer:
Row, absTol: Double) = {
--- End diff --
@holdenk Changed name to `checkAggregatesWithTol` and moved to query test.
We can now use this for the various aggregate testing. I think ultimately a
more elegant solution is needed, but this provides a way to add tolerancing for
now.
---
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]