tonghuaroot opened a new pull request, #56423: URL: https://github.com/apache/spark/pull/56423
### What changes were proposed in this pull request? This PR adds positive parity tests for `Index.identical` in pandas-on-Spark (`IndexBasicMixin` in `python/pyspark/pandas/tests/indexes/test_basic.py`). The tests compare the `True`/`False` result of `Index.identical` against pandas for single `Index` and `MultiIndex`: equal elements with the same name, equal elements with a different name (the case that distinguishes `identical` from `equals`), unequal elements, and comparing an `Index` against a `MultiIndex`. ### Why are the changes needed? `Index.identical` currently has no positive test coverage. The only mention of it in the test suite is a comment in `test_equals` noting that `equals` ignores the index name unlike `identical`; the method itself is never exercised. These tests close that gap and lock in that `identical` returns `True` only when both the elements and the name match. ### 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_identical`); 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]
