tonghuaroot opened a new pull request, #56362: URL: https://github.com/apache/spark/pull/56362
### What changes were proposed in this pull request? This PR adds positive parity tests for `Index.equals` in pandas-on-Spark (`IndexBasicMixin` in `python/pyspark/pandas/tests/indexes/test_basic.py`). The tests compare the `True`/`False` result of `Index.equals` against pandas for single `Index` and `MultiIndex`: equal and unequal element sets, reordered elements, and the fact that `equals` ignores the index name. ### Why are the changes needed? `Index.equals` currently has no positive test coverage. The only existing test exercises the error path when `compute.ops_on_diff_frames` is disabled and never checks the actual `True`/`False` result, so the common behavior is untested. These tests close that gap. ### Does this PR introduce _any_ user-facing change? No. This PR only adds tests. ### How was this patch tested? Ran the new test against a local SparkSession (`IndexBasicTests.test_equals`); it passes. ### Was this patch authored or co-authored using generative AI tooling? Yes, this patch was co-authored with generative AI tooling (Claude, Anthropic Opus 4.8). The contributor selected the under-tested method, required that the asserted cases first be verified to match pandas on a real SparkSession (excluding inputs where pandas-on-Spark intentionally differs, e.g. NaN comparison under Spark equality), and reviewed the result. -- 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]
