This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 35bc0b4ecd2 [SPARK-46341][PS][TESTS][FOLLOWUP] Sort indices before dataframe comparison 35bc0b4ecd2 is described below commit 35bc0b4ecd266de2eb5f53f92491a53efe9c3eef Author: Ruifeng Zheng <ruife...@apache.org> AuthorDate: Mon Dec 11 10:32:14 2023 -0800 [SPARK-46341][PS][TESTS][FOLLOWUP] Sort indices before dataframe comparison ### What changes were proposed in this pull request? ### Why are the changes needed? Sort indices before dataframe comparison ### Does this PR introduce _any_ user-facing change? no, test-only ### How was this patch tested? ci and manually check ### Was this patch authored or co-authored using generative AI tooling? no Closes #44295 from zhengruifeng/ps_test_interpolate_sort_index. Authored-by: Ruifeng Zheng <ruife...@apache.org> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/pandas/tests/series/test_interpolate.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/pyspark/pandas/tests/series/test_interpolate.py b/python/pyspark/pandas/tests/series/test_interpolate.py index 0008dd2ee91..fad684822a6 100644 --- a/python/pyspark/pandas/tests/series/test_interpolate.py +++ b/python/pyspark/pandas/tests/series/test_interpolate.py @@ -24,7 +24,10 @@ from pyspark.testing.pandasutils import PandasOnSparkTestCase class SeriesInterpolateMixin: def _test_interpolate(self, pobj): psobj = ps.from_pandas(pobj) - self.assert_eq(psobj.interpolate(), pobj.interpolate()) + self.assert_eq( + psobj.interpolate().sort_index(), + pobj.interpolate().sort_index(), + ) for limit, limit_direction, limit_area in [ (1, None, None), (2, "forward", "inside"), @@ -35,10 +38,10 @@ class SeriesInterpolateMixin: self.assert_eq( psobj.interpolate( limit=limit, limit_direction=limit_direction, limit_area=limit_area - ), + ).sort_index(), pobj.interpolate( limit=limit, limit_direction=limit_direction, limit_area=limit_area - ), + ).sort_index(), ) def test_interpolate(self): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org