forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-44453][PYTHON] Use difflib to display errors in assertDataFram…
…eEqual ### What changes were proposed in this pull request? This PR uses the built-in Python library, difflib, to display errors in the testing util `assertDataFrameEqual` ### Why are the changes needed? The change makes the error message output more user-friendly, as well as consistent with `assertSchemaEqual` ### Does this PR introduce _any_ user-facing change? Yes, the PR changes the test util output for the user-facing util function `assertDataFrameEqual`. ### How was this patch tested? Existing tests in `runtime/python/pyspark/sql/tests/test_utils.py` and `runtime/python/pyspark/sql/tests/connect/test_utils.py` Example output: <img width="891" alt="Screenshot 2023-07-16 at 8 20 31 PM" src="https://github.com/apache/spark/assets/68875504/2d7a9d02-bb9e-4c21-b330-5ec01b2e9ec8"> <img width="868" alt="Screenshot 2023-07-16 at 8 20 41 PM" src="https://github.com/apache/spark/assets/68875504/eba9f3e8-e147-491c-934b-34e8351df012"> Closes apache#42031 from asl3/difflib-assertdfequal. Authored-by: Amanda Liu <amanda.liu@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information
1 parent
e578d46
commit aa68810
Showing
2 changed files
with
82 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters