[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
Open
Conversation
HyukjinKwon
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This backports the test-side change of SPARK-58529 to
branch-4.0. It relaxes thetest_vectorized_udf_invalid_lengthassertion intest_pandas_udf_scalar.pyfrom 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.0continues to raise the message with its trailingResult vector from pandas_udf ...clause.Why are the changes needed?
The
pyspark-connect-old-clientjob onmasterclonesbranch-4.0's tests and runs them against amasterserver. After SPARK-58529 removed the pandas-specific tail from theRESULT_ROWS_MISMATCHmessage onmaster,branch-4.0's assertion on that removed substring fails against the new server. The relaxed regex matches both the old (branch-4.0server) and new (masterserver) messages, sobranch-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_lengthcontinues to run.Was this patch authored or co-authored using generative AI tooling?
No.