Skip to content

[SPARK-56345][PYTHON][TESTS] Use pd.Series.__name__ in Arrow UDF type-hint test#55175

Closed
ueshin wants to merge 1 commit intoapache:masterfrom
ueshin:issues/SPARK-56345/typehints
Closed

[SPARK-56345][PYTHON][TESTS] Use pd.Series.__name__ in Arrow UDF type-hint test#55175
ueshin wants to merge 1 commit intoapache:masterfrom
ueshin:issues/SPARK-56345/typehints

Conversation

@ueshin
Copy link
Copy Markdown
Member

@ueshin ueshin commented Apr 2, 2026

What changes were proposed in this pull request?

This PR updates python/pyspark/sql/tests/arrow/test_arrow_udf_typehints.py to make the negative Arrow UDF type-hint assertion build the expected error pattern from pd.Series.__name__ instead of hard-coding pandas.core.series.Series.

The change is limited to the test expectation in ArrowUDFTypeHintsTests.test_negative_with_pandas_udf.

Why are the changes needed?

The previous assertion depended on a hard-coded fully qualified pandas type name. Building the expected pattern from pd.Series.__name__ makes the test less coupled to a specific pandas type string representation while still checking that an unsupported pandas Series signature is rejected.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Updated the related test expectation.

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

No.

@ueshin
Copy link
Copy Markdown
Member Author

ueshin commented Apr 2, 2026

@ueshin
Copy link
Copy Markdown
Member Author

ueshin commented Apr 3, 2026

Thanks! merging to master.

@ueshin ueshin closed this in ccd4206 Apr 3, 2026
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