allisonwang-db commented on code in PR #41606:
URL: https://github.com/apache/spark/pull/41606#discussion_r1253826970
##########
python/pyspark/testing/utils.py:
##########
@@ -209,3 +234,80 @@ def check_error(
self.assertEqual(
expected, actual, f"Expected message parameters was '{expected}',
got '{actual}'"
)
+
+
+def assertDataFrameEqual(df: DataFrame, expected: DataFrame, ignore_row_order:
bool = True):
Review Comment:
Let's add docstring for this method and also include some details on how we
approximate the results.
Also, for the expected value, we should allow users to pass in a Row or a
list of rows (this can be a follow-up for this PR):
```
assertDataFrameEqual(df, Row(a=1))
assertDataFrameEqual(df, [Row(a=1), Row(a=2)])
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]