tonghuaroot created SPARK-57363:
-----------------------------------

             Summary: Add tests for Index.identical in pandas-on-Spark
                 Key: SPARK-57363
                 URL: https://issues.apache.org/jira/browse/SPARK-57363
             Project: Spark
          Issue Type: Test
          Components: Pandas API on Spark
    Affects Versions: 5.0.0
            Reporter: tonghuaroot


Index.identical in pandas-on-Spark (pyspark.pandas.indexes.base.Index) has no 
positive test coverage. The method behaves like Index.equals but additionally 
requires the index name(s) to match, yet the test suite never asserts its 
True/False result - the only reference to it is a comment in test_equals noting 
that equals ignores the index name unlike identical. This adds positive parity 
tests in IndexBasicMixin (python/pyspark/pandas/tests/indexes/test_basic.py), 
comparing Index.identical against pandas for: a single Index compared with 
itself; equal elements with the same name (-> True); equal elements with a 
different name (-> False, the case that distinguishes identical from equals); 
unequal elements (-> False); a MultiIndex compared with itself and with another 
MultiIndex that has the same tuples but different level names (-> False); and 
an Index compared against a MultiIndex (-> False). Cross-object comparisons are 
wrapped in option_context('compute.ops_on_diff_frames', True), mirroring the 
existing test_equals. No product code changes; tests only.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to