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

GH-45582: [Python] Preserve decimal32/64/256 metadata in Schema.metadata #45583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Feb 20, 2025

Rationale for this change

Before, these types would be interpreted as "object" type and therefore the precision and scale attributes of these types would not be preserved in the "metadata"

What changes are included in this PR?

Uses pa.types.is_decimal is instead of isinstanceing just the Decimal128Type to determine a "decimal" pandas type

Are these changes tested?

Yes

Are there any user-facing changes?

Yes

closes #45582

Copy link

⚠️ GitHub issue #45582 has been automatically assigned in GitHub to PR creator.

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.

[Python] pyarrow.pandas_compat.get_logical_type(pyarrow.decimal32/64(...)) returns object instead of decimal
1 participant