Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-36001][PYTHON] Assume result's index to be disordered in tests…
… with operations on different Series ### What changes were proposed in this pull request? For tests with operations on different Series, sort index of results before comparing them with pandas. ### Why are the changes needed? We have many tests with operations on different Series in `spark/python/pyspark/pandas/tests/data_type_ops/` that assume the result's index to be sorted and then compare to the pandas' behavior. The assumption on the result's index ordering is wrong since Spark DataFrame join is used internally and the order is not preserved if the data being in different partitions. So we should assume the result to be disordered and sort the index of such results before comparing them with pandas. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Unit tests. Closes #33274 from xinrong-databricks/datatypeops_testdiffframe. Authored-by: Xinrong Meng <xinrong.meng@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information
1 parent
115b8a1
commit af81ad0
Showing
3 changed files
with
21 additions
and
17 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
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