Skip to content

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Sep 14, 2023

What changes were proposed in this pull request?

This PR proposes to remove deprecated Index APIs from Pandas API on Spark.

Why are the changes needed?

To follow the behavior of the latest Pandas.

See pandas-dev/pandas#37877 for Index.asi8

See pandas-dev/pandas#42113 for Index.is_type_compatible

Does this PR introduce any user-facing change?

Index.asi8, Index.is_type_compatible is removed. Index.astype and Index.isin can be used instead respectively.

How was this patch tested?

The existing CI should pass.

Was this patch authored or co-authored using generative AI tooling?

No.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it seems that there are leftovers.

ERROR [0.054s]: test_is_type_compatible (pyspark.pandas.tests.indexes.test_base.IndexesTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/spark/spark/python/pyspark/pandas/tests/indexes/test_base.py", line 1593, in test_is_type_compatible
    self.assert_eq(psidx.is_type_compatible(data_type), expected_result)
  File "/__w/spark/spark/python/pyspark/pandas/indexes/base.py", line 2617, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(type(self).__name__, item))
AttributeError: 'Index' object has no attribute 'is_type_compatible'

@itholic
Copy link
Contributor Author

itholic commented Sep 15, 2023

Oh, I missed it. Just cleared the leftovers, thanks!

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM (Pending CIs). Thank you for updates.

@dongjoon-hyun
Copy link
Member

Merged to master. Thank you, @itholic and all.

@itholic itholic deleted the SPARK-45164 branch November 20, 2023 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants