Skip to content

[SPARK-58529][PYTHON][4.0] Relax RESULT_ROWS_MISMATCH assertion for cross-version old-client compatibility - #57772

Open
Yicong-Huang wants to merge 2 commits into
apache:branch-4.0from
Yicong-Huang:backport-58529-branch-4.0
Open

[SPARK-58529][PYTHON][4.0] Relax RESULT_ROWS_MISMATCH assertion for cross-version old-client compatibility#57772
Yicong-Huang wants to merge 2 commits into
apache:branch-4.0from
Yicong-Huang:backport-58529-branch-4.0

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This backports the test-side change of SPARK-58529 to branch-4.0. It relaxes the test_vectorized_udf_invalid_length assertion in test_pandas_udf_scalar.py from the pandas-specific substring "Result vector from pandas_udf was not the required length" to the shared "The number of output rows.*must match the number of input rows" template text.

No production code changes -- branch-4.0 continues to raise the message with its trailing Result vector from pandas_udf ... clause.

Why are the changes needed?

The pyspark-connect-old-client job on master clones branch-4.0's tests and runs them against a master server. After SPARK-58529 removed the pandas-specific tail from the RESULT_ROWS_MISMATCH message on master, branch-4.0's assertion on that removed substring fails against the new server. The relaxed regex matches both the old (branch-4.0 server) and new (master server) messages, so branch-4.0's own CI and the cross-version old-client job both pass.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

The relaxed regex was verified to match both the old message (with the pandas tail) and the new message (without it). Existing test_vectorized_udf_invalid_length continues to run.

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

No.

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