Skip to content

ENH/TST: Add BaseInterfaceTests tests for ArrowExtensionArray #47377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 22, 2022

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Arrow pyarrow functionality labels Jun 16, 2022
@mroeschke mroeschke added this to the 1.5 milestone Jun 16, 2022
if TYPE_CHECKING:
from pandas import Series

ArrowExtensionArrayT = TypeVar("ArrowExtensionArrayT", bound="ArrowExtensionArray")


class ArrowExtensionArray(ExtensionArray):
class ArrowExtensionArray(OpsMixin, ExtensionArray):
Copy link
Member Author

Choose a reason for hiding this comment

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

Should I be using ExtensionOpsMixin or OpsMixin @jbrockmendel?

Copy link
Member

Choose a reason for hiding this comment

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

i recommend OpsMixin

@@ -45,13 +46,22 @@
from pandas.core.arrays.arrow._arrow_utils import fallback_performancewarning
from pandas.core.arrays.arrow.dtype import ArrowDtype

ARROW_CMP_FUNCS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't there a min version on some of these?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like they all have been around since pyarrow version 2 which I think is the version we require to use these functions

Copy link
Member Author

Choose a reason for hiding this comment

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

Plus we catch the except (pa.lib.ArrowNotImplementedError, pa.lib.ArrowInvalid) when calling these with fallback behavior.

@jreback
Copy link
Contributor

jreback commented Jun 17, 2022

ahh merge conflict!

Copy link
Member Author

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

@jreback resolved the merge conflict

@jreback jreback merged commit d40c371 into pandas-dev:main Jun 22, 2022
@jreback
Copy link
Contributor

jreback commented Jun 22, 2022

thanks very nice @mroeschke

@mroeschke mroeschke deleted the enh/arrow_interface_tests branch June 22, 2022 02:05
simonjayhawkins added a commit that referenced this pull request Jun 22, 2022
#47462)

Revert "ENH/TST: Add BaseInterfaceTests tests for ArrowExtensionArray (#47377)"

This reverts commit d40c371.
@simonjayhawkins
Copy link
Member

@mroeschke i've reverted this. can you resubmit.

@mroeschke mroeschke restored the enh/arrow_interface_tests branch June 22, 2022 16:57
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
pandas-dev#47462)

Revert "ENH/TST: Add BaseInterfaceTests tests for ArrowExtensionArray (pandas-dev#47377)"

This reverts commit d40c371.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants