[SPARK-55579][PYTHON][4.1] Rename PySpark error classes to be eval-type-agnostic#55147
Closed
Yicong-Huang wants to merge 2 commits intoapache:branch-4.1from
Closed
[SPARK-55579][PYTHON][4.1] Rename PySpark error classes to be eval-type-agnostic#55147Yicong-Huang wants to merge 2 commits intoapache:branch-4.1from
Yicong-Huang wants to merge 2 commits intoapache:branch-4.1from
Conversation
…nostic Rename six PySpark error conditions to be generic and not tied to specific UDF eval types: | Old Name | New Name | |---|---| | `PANDAS_UDF_OUTPUT_EXCEEDS_INPUT_ROWS` | `OUTPUT_EXCEEDS_INPUT_ROWS` | | `RESULT_LENGTH_MISMATCH_FOR_SCALAR_ITER_PANDAS_UDF` | `RESULT_ROWS_MISMATCH` | | `STOP_ITERATION_OCCURRED_FROM_SCALAR_ITER_PANDAS_UDF` | `INPUT_NOT_FULLY_CONSUMED` | | `RESULT_LENGTH_MISMATCH_FOR_PANDAS_UDF` | `RESULT_COLUMN_SCHEMA_MISMATCH` | | `RESULT_COLUMNS_MISMATCH_FOR_PANDAS_UDF` | `RESULT_COLUMN_NAMES_MISMATCH` | | `RESULT_COLUMNS_MISMATCH_FOR_ARROW_UDF` | `RESULT_COLUMN_NAMES_MISMATCH` (merged) | Also updated error messages to not reference specific eval types or data structures (e.g., "pandas.DataFrame", "pyarrow.Table" -> "data"). These error conditions were originally created for Pandas UDFs, but are now shared by Arrow UDFs as well. The names and messages should be generic so they can be reused across different eval types without confusion. Part of [SPARK-55388](https://issues.apache.org/jira/browse/SPARK-55388). Yes. Error condition names and messages are updated. Users who catch specific error conditions by name will need to update their references. Existing tests updated to match new error condition names and messages. No Closes apache#54996 from Yicong-Huang/SPARK-55579/rename-error-classes. Authored-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
zhengruifeng
pushed a commit
that referenced
this pull request
Apr 2, 2026
…pe-agnostic ### What changes were proposed in this pull request? Backport of #54996 to branch-4.1. Rename six PySpark error conditions to be generic and not tied to specific UDF eval types: | Old Name | New Name | |---|---| | `PANDAS_UDF_OUTPUT_EXCEEDS_INPUT_ROWS` | `OUTPUT_EXCEEDS_INPUT_ROWS` | | `RESULT_LENGTH_MISMATCH_FOR_SCALAR_ITER_PANDAS_UDF` | `RESULT_ROWS_MISMATCH` | | `STOP_ITERATION_OCCURRED_FROM_SCALAR_ITER_PANDAS_UDF` | `INPUT_NOT_FULLY_CONSUMED` | | `RESULT_LENGTH_MISMATCH_FOR_PANDAS_UDF` | `RESULT_COLUMN_SCHEMA_MISMATCH` | | `RESULT_COLUMNS_MISMATCH_FOR_PANDAS_UDF` | `RESULT_COLUMN_NAMES_MISMATCH` | | `RESULT_COLUMNS_MISMATCH_FOR_ARROW_UDF` | `RESULT_COLUMN_NAMES_MISMATCH` (merged) | Also updated error messages to not reference specific eval types or data structures (e.g., "pandas.DataFrame", "pyarrow.Table" -> "data"). ### Why are the changes needed? These error conditions were originally created for Pandas UDFs, but are now shared by Arrow UDFs as well. The names and messages should be generic so they can be reused across different eval types without confusion. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests updated to match new error class names and messages. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #55147 from Yicong-Huang/SPARK-55579-backport-4.1. Lead-authored-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com> Co-authored-by: Yicong-Huang <17627829+Yicong-Huang@users.noreply.github.com> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
Contributor
|
merged to 4.1 for CI |
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?
Backport of #54996 to branch-4.1.
Rename six PySpark error conditions to be generic and not tied to specific UDF eval types:
PANDAS_UDF_OUTPUT_EXCEEDS_INPUT_ROWSOUTPUT_EXCEEDS_INPUT_ROWSRESULT_LENGTH_MISMATCH_FOR_SCALAR_ITER_PANDAS_UDFRESULT_ROWS_MISMATCHSTOP_ITERATION_OCCURRED_FROM_SCALAR_ITER_PANDAS_UDFINPUT_NOT_FULLY_CONSUMEDRESULT_LENGTH_MISMATCH_FOR_PANDAS_UDFRESULT_COLUMN_SCHEMA_MISMATCHRESULT_COLUMNS_MISMATCH_FOR_PANDAS_UDFRESULT_COLUMN_NAMES_MISMATCHRESULT_COLUMNS_MISMATCH_FOR_ARROW_UDFRESULT_COLUMN_NAMES_MISMATCH(merged)Also updated error messages to not reference specific eval types or data structures (e.g., "pandas.DataFrame", "pyarrow.Table" -> "data").
Why are the changes needed?
These error conditions were originally created for Pandas UDFs, but are now shared by Arrow UDFs as well. The names and messages should be generic so they can be reused across different eval types without confusion.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests updated to match new error class names and messages.
Was this patch authored or co-authored using generative AI tooling?
No.