Skip to content
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

fix: remove Category inheritance from ArrowDictionary #1848

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

darenliang
Copy link

This PR removes Category inheritance from ArrowDictionary because it does not need the category attribute check here: https://github.com/unionai-oss/pandera/blob/main/pandera/dtypes.py#L483

Old behavior:

import pyarrow
from pandera.engines.pandas_engine import ArrowDictionary

int64_dictionary = ArrowDictionary(value_type=pyarrow.int64())
string_dictionary = ArrowDictionary(value_type=pyarrow.string())

int64_dictionary.check(string_dictionary)  # True

New behavior:

int64_dictionary.check(string_dictionary)  # False

@cosmicBboy
Copy link
Collaborator

@darenliang thanks for the contribution!

mind resolving the merge conflict?

@darenliang
Copy link
Author

@cosmicBboy Fixed the merge conflicts

@cosmicBboy
Copy link
Collaborator

Signed-off-by: Daren Liang <[email protected]>
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.29%. Comparing base (812b2a8) to head (9284441).
Report is 154 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1848      +/-   ##
==========================================
- Coverage   94.28%   93.29%   -1.00%     
==========================================
  Files          91      120      +29     
  Lines        7013     9198    +2185     
==========================================
+ Hits         6612     8581    +1969     
- Misses        401      617     +216     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants