Skip to content

Conversation

@Yicong-Huang
Copy link
Contributor

What changes were proposed in this pull request?

Skip test_pandas_instances_coercion on PyArrow < 19 and add a separate test for PyArrow < 19 behavior.

Why are the changes needed?

PyArrow < 19 and >= 19 have different pa.array() type coercion behavior for ArrowDtype-backed Series.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Tested with PyArrow 18~22.

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

No

@github-actions
Copy link

JIRA Issue Information

=== Sub-task SPARK-54939 ===
Summary: Add tests for pa.array type coercion
Assignee: Yicong Huang
Status: Resolved
Affected: ["4.2.0"]


This comment was automatically generated by GitHub Actions

Comment on lines +46 to +47
if have_pyarrow:
import pyarrow as pa
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I find this slightly more readable if you reuse the variable name in the skip clauses.

Suggested change
if have_pyarrow:
import pyarrow as pa
if have_pyarrow:
import pyarrow as pa
pyarrow_19_or_greater = LooseVersion(pa.__version__) >= LooseVersion("19.0.0")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the suggestion! adopted.

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.

2 participants