-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
mroeschke
commented
Jun 16, 2022
- Tests added and passed if fixing a bug or adding a new feature
- All code checks passed.
if TYPE_CHECKING: | ||
from pandas import Series | ||
|
||
ArrowExtensionArrayT = TypeVar("ArrowExtensionArrayT", bound="ArrowExtensionArray") | ||
|
||
|
||
class ArrowExtensionArray(ExtensionArray): | ||
class ArrowExtensionArray(OpsMixin, ExtensionArray): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
ahh merge conflict! |
There was a problem hiding this 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
thanks very nice @mroeschke |
@mroeschke i've reverted this. can you resubmit. |
pandas-dev#47462) Revert "ENH/TST: Add BaseInterfaceTests tests for ArrowExtensionArray (pandas-dev#47377)" This reverts commit d40c371.