[SPARK-58529][PYTHON][4.1] Relax RESULT_ROWS_MISMATCH assertion for cross-version old-client compatibility - #57776
Closed
Yicong-Huang wants to merge 1 commit into
Closed
Conversation
HyukjinKwon
approved these changes
Aug 5, 2026
Yicong-Huang
added a commit
that referenced
this pull request
Aug 5, 2026
…ross-version old-client compatibility ### What changes were proposed in this pull request? This backports the test-side change of SPARK-58529 to this maintenance branch. It relaxes the `test_vectorized_udf_invalid_length` assertion in `test_pandas_udf_scalar.py` to accept both this branch's `SCHEMA_MISMATCH_FOR_PANDAS_UDF` message (`Result vector from pandas_udf was not the required length`) and the `RESULT_ROWS_MISMATCH` message a newer server raises (`The number of output rows ... must match the number of input rows`). No production code changes -- this branch continues to raise its existing message. ### Why are the changes needed? The `pyspark-connect-old-client` cross-version job clones a maintenance branch's tests and runs them against a newer (master) server. It currently pins `branch-4.0`, but the base is expected to advance to `branch-4.1` / `branch-4.2`. When it does, an assertion pinned to the old pandas-specific substring would fail against a master server that no longer emits it (after SPARK-58529). Relaxing the assertion now -- to match both messages -- keeps this branch's own CI green today and prevents the cross-version job from breaking when its base advances. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? The relaxed regex was verified to match both this branch's message and the newer `RESULT_ROWS_MISMATCH` message. Existing `test_vectorized_udf_invalid_length` continues to run. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #57776 from Yicong-Huang/backport-58529-branch-4.1. Authored-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com> Signed-off-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com>
Contributor
Author
|
Merge Summary:
Posted by |
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 this maintenance branch. It relaxes the
test_vectorized_udf_invalid_lengthassertion intest_pandas_udf_scalar.pyto accept both this branch'sSCHEMA_MISMATCH_FOR_PANDAS_UDFmessage (Result vector from pandas_udf was not the required length) and theRESULT_ROWS_MISMATCHmessage a newer server raises (The number of output rows ... must match the number of input rows).No production code changes -- this branch continues to raise its existing message.
Why are the changes needed?
The
pyspark-connect-old-clientcross-version job clones a maintenance branch's tests and runs them against a newer (master) server. It currently pinsbranch-4.0, but the base is expected to advance tobranch-4.1/branch-4.2. When it does, an assertion pinned to the old pandas-specific substring would fail against a master server that no longer emits it (after SPARK-58529). Relaxing the assertion now -- to match both messages -- keeps this branch's own CI green today and prevents the cross-version job from breaking when its base advances.Does this PR introduce any user-facing change?
No.
How was this patch tested?
The relaxed regex was verified to match both this branch's message and the newer
RESULT_ROWS_MISMATCHmessage. Existingtest_vectorized_udf_invalid_lengthcontinues to run.Was this patch authored or co-authored using generative AI tooling?
No.